Re: Querying 19million records very slowly

Поиск
Список
Период
Сортировка
От Tobias Brox
Тема Re: Querying 19million records very slowly
Дата
Msg-id 20050622093644.GA7839@tobias
обсуждение исходный текст
Ответ на Re: Querying 19million records very slowly  (Kjell Tore Fossbakk <kjelltore@gmail.com>)
Ответы Re: Querying 19million records very slowly  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
[Kjell Tore Fossbakk - Wed at 11:10:42AM +0200]
> Which one does Pg read fastes? Does he convert datetime in the table,
> then my where clause and check, for each row? How does he compare a
> datetime with a datetime? Timestamp are easy, large number bigger than
> another large number..
>
> time (datetime) > '2005-06-21 10:36:22+02'
>
> or
>
> time (timestamp) > 'some timestamp pointing to yesterday'

If I have understood it correctly, the planner will recognize the timestamp
and compare it with the statistics in the first example but not in the
second, and thus it will be more likely to use index scan on the first one
and seqscan on the second.

--
Tobias Brox, +86-13521622905
Nordicbet, IT dept

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

Предыдущее
От: "Markus Wollny"
Дата:
Сообщение: Forums & tsearch2 - best practices reg. concurrency
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Forums & tsearch2 - best practices reg. concurrency