Marco Bambini wrote:
This query on a small database sometimes takes more than 40 seconds:
select _rowid, public_id, vote_count, status, summary, component,
date(date_modified), quickfix from reports where public = 1 AND _rowid
IN (select distinct r._rowid from reports r, segments s where
s.report_id = r._rowid AND r.public = 1 AND s.public = 1 AND (r.summary
LIKE '%server%' OR s.content LIKE '%server%')) order by vote_count DESC
I'm no expert, but won't this bit
> LIKE '%server%' OR s.content LIKE '%server%')) order by vote_count
force the query to perform a full table scan regardless of the indexes?
What happens to the query speed if you (temporarily) change the LIKE
clauses to look for a specific record?
Martin
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------