| От | Bruno Wolff III |
|---|---|
| Тема | Re: Indexes? |
| Дата | |
| Msg-id | 20041202194343.GA32549@wolff.to обсуждение исходный текст |
| Ответ на | Indexes? (Bjørn T Johansen <btj@havleik.no>) |
| Список | pgsql-general |
On Thu, Dec 02, 2004 at 07:11:29 +0100, Bjørn T Johansen <btj@havleik.no> wrote: > I have a table where I need to use "..where curdate between fromDate and > toDate". > Is it best to have two indexes, one for FromDate and one for toDate or just > one index for both the fields? Assuming that curdate is something like the date when the query is being run and that FromDate and toDate are columns in the table you are searching, then you probably want indexes on each column. A combined index scan wouldn't be useful. An index scan on either FromDate or toDate might be useful depending on the distribution of values in those columns and the value of curdate.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера