Subject | Re: Access in asc and desc order, index twice? |
---|---|
Author | Adam |
Post date | 2005-09-16T23:59:29Z |
--- In firebird-support@yahoogroups.com, Federico Tello Gentile
<fgentile@s...> wrote:
you get any measurable increase in performance. I would add both
indices though, as it wont be expensive to maintain them and it is
good practice to have appropriate indices to back up any queries you
plan on running. It may be 10 this month, in two years time, who knows
it may jump to 500 a month.
:)
Adam
<fgentile@s...> wrote:
> To get the installments to pay in secuential order I have to querytransaction.
> sorting by year asc and month asc
>
> But to get the last payed installemnt I have to query by year desc and
> month desc using a "select first 1"
>
> Both queries are done always one after the other in the same
>Yes it will improve performance but
> Should I index this table's year and month twice, once ascending and
> once descending to improve performance?
>A reality check, at that rate of growth, it might be 5 years before
> This particlar table will not grow a lot. I expect less than 10 new
> records a month. Occationally some newly added record could be deleted
> by the user.
>
you get any measurable increase in performance. I would add both
indices though, as it wont be expensive to maintain them and it is
good practice to have appropriate indices to back up any queries you
plan on running. It may be 10 this month, in two years time, who knows
it may jump to 500 a month.
:)
Adam