The query itself executes quite fast, but as it's one of the most frequently
executed queries in the entire program, I thought it important to make it as
fast as possible.

-----Original Message-----
From: Roger Baklund [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 11:40 PM
To: mysql
Cc: Noamn
Subject: Re: Improving a query


* Noamn
[...]

Please reply to the list. :)

> Adding the composite index doesn't make any difference as far as
> I can see.
> Isn't there a way of forcing a specific index to be used?

Yes. From mysql version 4.0.9 you can write FORCE INDEX, for earlier
versions you can try USE INDEX.

<URL: http://www.mysql.com/doc/en/SELECT.html >

> Does all the above have anything to do with the
> 'select_full_join' variable?

Well... the 'select_full_join' variable should increase every time you do a
join without keys... but check below.

> Presumably this gets increased everytime a table has the type ALL, and
> that's what I want to avoid.

Note that the ALL probably is because there are very few rows in the status
table.

<URL: http://www.mysql.com/doc/en/How_to_avoid_table_scan.html >

What execution times are you looking at? Is it very slow?

--
Roger


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to