Subject | Re[2]: [firebird-support] Select/index efficiency question |
---|---|
Author | Daniel G. Wilson |
Post date | 2003-11-29T02:53:38Z |
Helen,
Thanks for the quick reply!
You are of course correct. I re-read the earlier thread, and that was exactly your advice: I read Arno Brinkman's later message, probably misinterpreted his meaning, and took that as the final word without re-examining your earlier advice. With the index set the way you suggest, it is indeed selected for use in the execution plan.
Thanks again,
Dan.
P.S. It's late spring Down Under, if I'm not mistaken: why are you spending your Saturday afternoon indoors on the computer? :)
(Asked by a geek who is spending his Friday evening in southern California indoors on the computer <G>)
*********** REPLY SEPARATOR ***********
Thanks for the quick reply!
You are of course correct. I re-read the earlier thread, and that was exactly your advice: I read Arno Brinkman's later message, probably misinterpreted his meaning, and took that as the final word without re-examining your earlier advice. With the index set the way you suggest, it is indeed selected for use in the execution plan.
Thanks again,
Dan.
P.S. It's late spring Down Under, if I'm not mistaken: why are you spending your Saturday afternoon indoors on the computer? :)
(Asked by a geek who is spending his Friday evening in southern California indoors on the computer <G>)
*********** REPLY SEPARATOR ***********
On 11/29/2003 at 1:20 PM Helen Borrie wrote:
At 05:58 PM 28/11/2003 -0800, you wrote:
>This index has many millions of duplicates, as a single stock id is found
>in many tens of thousands of rows in the stockpricetable. Data inserts
>are slowed significantly by this index: removing it almost doubled import
>speed. Without it, though, selects are incredibly slow, as one would
expect:
>
>PLAN(STOCKPRICETABLE NATURAL)
>
>After reading the latest threads, and thinking I understood them, I tried
>this:
>
>CREATE ASC INDEX STOCK_PRICE_STOCK_INDEX ON
>STOCKPRICETABLE(STOCKPRICE_ID,STOCK_ID);
>
>However, the plan selected is still STOCKPRICETABLE NATURAL.
>
>So clearly, I have misunderstood the heart of the select query efficiency
>conversation that has been going on here. If some expert could please
>enlighten me as to what I am missing, I would greatly appreciate it! Or
>should I just leave the original index in place, inactivate it at the
>start of a bulk-insert, and then reactivate it at the end of the insert,
>and live with the millions of duplicates?
Dan,
I think you've kinda drawn the wrong conclusion here. Turn that index
around so that STOCK_ID comes first. As you have it, it's not going to get
used for a "WHERE STOCK_ID = " search.
heLen
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/