Subject | Access in asc and desc order, index twice? |
---|---|
Author | Federico Tello Gentile |
Post date | 2005-09-16T14:44:44Z |
To get the installments to pay in secuential order I have to query
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 transaction.
Should I index this table's year and month twice, once ascending and
once descending to improve performance?
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.
This runs in FB 1.5.1, but I will move to FB 2 as soon as it is stable
(you know FB 2 come with a lot of nice features and improvements).
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 transaction.
Should I index this table's year and month twice, once ascending and
once descending to improve performance?
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.
This runs in FB 1.5.1, but I will move to FB 2 as soon as it is stable
(you know FB 2 come with a lot of nice features and improvements).