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
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
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
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