Subject | Re: [firebird-support] Indexes and Plans |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2004-03-19T08:24:39Z |
On 18 Mar 2004 at 14:30, Epstein, Ed wrote:
common.
clause, it will help a bit.
BTW, do you count time of execution or execution+full fetch? Fetch
indeed may take much time if you ask for many wide fields. Note only
needed fields in fields list.
SY, Dimitry Sibiryakov.
>I have 2 different tables with a double precision field in each one. BothComaring two floating-point values for equality is a bad idea in
>are indexed. I am trying to perform a query of the values that are in both
>tables.
>
>I have tried many variations, but this is the most logical one to me:
>
>SELECT * FROM TABLEA INNER JOIN TABLEB ON TABLEA.FIELD1 = TABLEB.FIELD1
common.
>The Plan that is generated for that is (TableA Natural,TableB (IndexNo, because you ask for ALL records.
>TableB_Field1_A))
>
>Wouldn't the best plan be to use both indexes?
>Basically I am trying to create the fastest query to return values from bothProbably, if you put smaller table to the first place in FROM
>tables that are the same. So far it takes at least 2-5 minutes which is not
>very good.
clause, it will help a bit.
BTW, do you count time of execution or execution+full fetch? Fetch
indeed may take much time if you ask for many wide fields. Note only
needed fields in fields list.
SY, Dimitry Sibiryakov.