Explain and indexes

2005-03-09 Thread Terry Spencer
Im trying to speed up a query. select project_id from timesheet ts where ts.del is null and signoff = 'A' The output of explain is detailed below. ++-+---+--+-+--+ | id | select_type | table | type | possible_keys | key

Re: Explain and indexes

2005-03-09 Thread Jigal van Hemert
From: Terry Spencer An index exists on all three columns referred to, in addition to a combination of del and signoff. The indexes are listed as possible keys, but none used by the query; key = null. Can anyone suggest why? How can I optimise this? How many records are there in the table? If

Used EXPLAIN, have indexes - query still surprisingly slow

2004-05-26 Thread Andy Henshaw
I have the following query that takes anywhere from 1 to 3 seconds to run. I would expect it to run in less than 1/2 a second (and I really need it to do so). I've added the appropriate indices and tried EXPLAIN and ANALYZE; but, I'm not getting anywhere. SELECT message.id FROM

Re: Used EXPLAIN, have indexes - query still surprisingly slow

2004-05-26 Thread Robert J Taylor
Andy Henshaw wrote: I have the following query that takes anywhere from 1 to 3 seconds to run. I would expect it to run in less than 1/2 a second (and I really need it to do so). I've added the appropriate indices and tried EXPLAIN and ANALYZE; but, I'm not getting anywhere. SELECT