Subject Re: separate table or separate database
Author Sean
--- In firebird-support@yahoogroups.com, "Anderson Farias"
<peixedragao@...> wrote:
>
>
> |Table ABC with ID, Insert_Time, and some other fields. ID has both
> |ascending and descending index, same for Insert_Time.
>
> not a problem but -- I donĀ“t think having both desc and asc indices
help on
> anything. Since you are ordering desc, having only a desc index
should be
> enougth.

ID has both ASC and DESC because ASC is default from primary key ID.

>
> |The optimizer used the same plan:
> |PLAN (ABC ORDER IDX_ID_DESC)
>
> To me it seems hard to believe that. Are you sure the optimizer used
this
> PLAN for query 3??? couse I think it should use the index on
INSERT_TIME.
> quite weird.

Does "Order by" always take privilege to use index?

>
>
> |I have around 1,7 million records per week, and I need to store up to
> |1 year data.
>
> so, by looking at your query 1, it seems to me you're fetching as
much as
> 1,7 million records... is that what you need?
>

Sorry I missed typing "first 1000". I only intend to retrieve first
1000 records at a time.