Subject | Creating proper index |
---|---|
Author | Marcin Bury |
Post date | 2015-04-16T10:36:35Z |
Hi
I have a table that has (among others) two fields:
BL_PREFIX VARCHAR10
BOOKING_NO INTEGER
Column BL_PREFIX will have two, maximum three values
I need that following statement should be as fast as possible:
SELECT MAX(BOOKING_NO) FROM BOOKINGS WHERE BL_PREFIX = :BL_PREFIX
Is the compound descending index (BL_PREFIX, BOOKING_NO) enough for
above query?
Thanks
Marcin
I have a table that has (among others) two fields:
BL_PREFIX VARCHAR10
BOOKING_NO INTEGER
Column BL_PREFIX will have two, maximum three values
I need that following statement should be as fast as possible:
SELECT MAX(BOOKING_NO) FROM BOOKINGS WHERE BL_PREFIX = :BL_PREFIX
Is the compound descending index (BL_PREFIX, BOOKING_NO) enough for
above query?
Thanks
Marcin