![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to see if any of some appointments fall between two dates. the query looks like this: SELECT appointment FROM the_table WHERE date_mask < date_range AND flipped_date < flip_bits(the_table(date_mask)); Now, I believe indexes are used for BOTH comparisons, |
#3
| |||
| |||
|
| No, an index can be used for one or the other. Since we don't yet have bitmap combining of indexes, you don't get to apply two indexes in a single query. Even if you did, this would be relatively inefficient since each index would return a whole lotta rows. Why don't you just do the straightforward thing and look for WHERE appointment_date >= 'some_date' AND appointment_date <= 'some-other-date' AFAICS that solves the stated problem. Maybe you were not being clear about what you want? regards, tom lane |
#4
| |||
| |||
|
|
I don't see any indexable operator there at all. You might care to read http://developer.postgresql.org/docs...es/xindex.html which describes the behaviors Postgres indexes have. regards, tom lane |
#5
| |||
| |||
|
|
Since we don't yet have bitmap combining of indexes... ^^^ |
![]() |
| Thread Tools | |
| Display Modes | |
| |