Re: SQL Newbie needs urgently help! [optimizing query]
Hm, I wonder about MySQL's decision for the index usage. Categories, aka item_t1, is joined last and there's a condition that can use the primary key of that table.
Could you try adding "FORCE INDEX(PRIMARY)" right after "Categories item_t1"? Maybe MySQL tries to avoid reading the value for SourcePK (key_len 92 seems huge), but there are only two rows expected to be read, which should make that still perform a lot better than reading 18000 rows from Categories to perform the checks for the other conditions...
Subject
Views
Written By
Posted
3877
January 24, 2007 05:31AM
2533
January 24, 2007 05:52AM
2398
January 24, 2007 06:07AM
2456
January 24, 2007 06:18AM
2347
January 24, 2007 06:41AM
2384
January 24, 2007 07:16AM
2459
January 24, 2007 08:16AM
2523
January 24, 2007 08:50AM
2347
January 24, 2007 09:10AM
2536
January 24, 2007 09:24AM
2657
January 24, 2007 10:29AM
2464
January 24, 2007 10:40AM
Re: SQL Newbie needs urgently help! [optimizing query]
2371
January 24, 2007 03:19PM
2293
January 25, 2007 07:27AM
2383
January 24, 2007 07:16AM
2510
January 24, 2007 07:32AM
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.