Subject | Re: [firebird-support] Re: Subqueries and indexes |
---|---|
Author | Daniel Rail |
Post date | 2006-08-10T10:31:28Z |
Hi,
At August 10, 2006, 6:48 AM, yoav112003 wrote:
what Milan posted. Especially, since you said that both queries had
the same performance.
structured like the one Milan posted, and an index on events.ROWID
can't be used.
--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At August 10, 2006, 6:48 AM, yoav112003 wrote:
> Shouldn't the 'WHERE events.ROWID IN ...' clause be a hint to use theBecause the optimizer would've most likely rewritten your query to
> index on this field?
what Milan posted. Especially, since you said that both queries had
the same performance.
> As you can read in my reply to Milan, I tried to use a custom planAnd, the error is valid, since the optimizer is using a query
> with this query which used this index, but I got an error message.
structured like the one Milan posted, and an index on events.ROWID
can't be used.
> The query suggested by Milan and Helen have the same performance asIf using INNER JOIN yields better performance, use it.
> the my query, my guess is because they too require a full table scan
> on the events table.
> It seems that the best solution is to use an INNER JOIN query if
> possible, but I am still curious to know the reason the ROWID index
> cannot be used.
--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)