MySQL Forums
Forum List  »  Optimizer & Parser

Re: Simple Query - but explain worries me
Posted by: Jake Day
Date: November 01, 2005 07:37AM

Vangelis,

Header returns 36978

Detail returns 400798

i've also done a quick

select * from racedetail b where b.race_id not in (select a.race_id from raceheader a)

this returned 0 rows, thus definitely assuring me that there are no "orphans". (I tried to write a NOT EXISTS....but either my query writing is rusty(likely) or EXISTS works differently....)

I'm finding more and more issues though as i'm building queries that aren't "optimising" the way i'd expect them too....its possible(some might say probable!) that its due to my indexing, but most are fairly simple, so i am concerned :(


Update: - I've just checked the EXISTS stuff.....as suspected it was my rusty query writing. NOT EXISTS also returns 0 rows)



Edited 1 time(s). Last edit at 11/01/2005 07:43AM by Jake Day.

Options: ReplyQuote


Subject
Views
Written By
Posted
3285
November 01, 2005 01:26AM
2210
November 01, 2005 02:48AM
2077
November 01, 2005 05:13AM
Re: Simple Query - but explain worries me
2131
November 01, 2005 07:37AM
2183
November 01, 2005 08:03AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.