Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread What does JOIN default to
Fri, Oct 17 2008 11:39 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

I've been optimising this query

select distinct contacts._ID from
contacts
left join eln on contacts._id = eln._fkcontacts
where
attachsearch(_alist,_encoded,'contains the words','watling','Y')
and
_surname = 'watling'

attachsearch is an external function which scans email attachments. As shown above it takes about 5 seconds (which I'm very happy with).

typed without the left (as I always used to in my DBISAM days) it takes about 90 secs which is about the same if I use inner ditto for right outer join.

So what does JOIN default to?

Also I tried reading the stuff in the manual in the SELECT bit about joins and either my brain has definitely packed in or the manual doesn't make sense. If its my brain please someone try explaining to me.


Roy Lambert
Fri, Oct 17 2008 2:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< typed without the left (as I always used to in my DBISAM days) it takes
about 90 secs which is about the same if I use inner ditto for right outer
join.

So what does JOIN default to? >>

INNER.

<< Also I tried reading the stuff in the manual in the SELECT bit about
joins and either my brain has definitely packed in or the manual doesn't
make sense. If its my brain please someone try explaining to me. >>

Which part of the manual topic doesn't make sense ? Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Oct 18 2008 8:54 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


><< typed without the left (as I always used to in my DBISAM days) it takes
>about 90 secs which is about the same if I use inner ditto for right outer
>join.
>
>So what does JOIN default to? >>
>
>INNER.

Out of interest was that wat it was in DBISAM?

><< Also I tried reading the stuff in the manual in the SELECT bit about
>joins and either my brain has definitely packed in or the manual doesn't
>make sense. If its my brain please someone try explaining to me. >>
>
>Which part of the manual topic doesn't make sense ? Smiley

My brain had packed in! No surprise there after the sort of day I'd been having - I'd turned to coding for some light relief. Trying again just now the problem was that no matter how many times I read it I never managed to spot the words "target" and "source" and since the rest of the text is almost word for word identical my brain imploded.

Roy Lambert
Mon, Oct 20 2008 2:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Out of interest was that wat it was in DBISAM? >>

Yep, it's the standard.

<< My brain had packed in! No surprise there after the sort of day I'd been
having - I'd turned to coding for some light relief. >>

Well, there's your problem.  Here's the corrected version:

My brain had packed in! No surprise there after the sort of day I'd been
having - I'd turned to a beer for some light relief.

It's usually a bad idea to turn to coding for mental relief. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image