Re: Performace comparison of indexes over timestamp fields
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Performace comparison of indexes over timestamp fields |
| Дата | |
| Msg-id | 12213.1179843088@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Performace comparison of indexes over timestamp fields (Arnau <arnaulist@andromeiberica.com>) |
| Список | pgsql-performance |
Arnau <arnaulist@andromeiberica.com> writes:
> As you can see the time difference are very big
> Timestamp: 318.328 ms
> int8 index: 120.804 ms
> double precision: 57.065 ms
As already suggested elsewhere, you probably weren't sufficiently
careful in taking your measurements.
A look at the code says that int8 comparison ought to be the fastest
of these. If timestamps are implemented as floats (which you didn't
say) their comparison speed ought to be *exactly* the same as floats,
because the comparison functions are line-for-line the same. If
timestamps are implemented as int8 then they should be similar to
int8 comparisons, maybe a tad slower due to an extra level of function
call. But in any case it seems likely that the actual comparison
function calls would be just a small fraction of the runtime.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера