Hello to all!

has anybody got any ideas how i can speed up the following query?
it's so awfully slow (about 1 second).

the "test_item" table is the main problem. currently, it has
about 108.000 entries.

is it normal that it takes so long? and if it isn't, how can i
optimize the query? i've got indices on all relevant columns.


SELECT site.site_id, site.site_title, site.site_testtype, test.test_kt_points,
MIN(test_item.ti_evaluation) as completed,
IF (site.site_date < site.site_enddate, site.site_enddate, site.site_date) AS sort_date
FROM site
LEFT JOIN test ON (site.site_id = test.site_id)
LEFT JOIN test_item ON (test.test_id = test_item.test_id)
WHERE site.site_testtype IN (-1, 0, 1, 2)
GROUP BY site.site_id


thanks a lot in advance for any suggestions!
cheers,
nick

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

Reply via email to