SQL With Dates

Поиск
Список
Период
Сортировка
От Rafael Domiciano
Тема SQL With Dates
Дата
Msg-id 3a0028490904200655n53209fbbxf6010c60b024e029@mail.gmail.com
обсуждение исходный текст
Ответы Re: SQL With Dates  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Re: SQL With Dates  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: SQL With Dates  ("Mark Lewis" <mark.lewis@mir3.com>)
Re: SQL With Dates  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
Hello People,

I have initiated a work to review the sqls of our internal software.
Lot of them he problem are about sql logic, or join with table unecessary, and so on.
But software has lot of sql with date, doing thinks like:
[..]
  date >= '2009-04-01' AND
  date <= '2009-04-15'
[..]

Redoing the SQL with fix date (date = '2009-04-01') o cost in explain always still about 200 or less. But with a period the cost is high, about 6000 or more.

Select is using Index and the date is using index too.

There is some way to use date period with less cost?

Rafael Domiciano

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: No hash join across partitioned tables?
Следующее
От: Matthew Wakeling
Дата:
Сообщение: Re: GiST index performance