| От | Steinar H. Gunderson |
|---|---|
| Тема | Re: Seqscan rather than Index |
| Дата | |
| Msg-id | 20041217235548.GD16149@uio.no обсуждение исходный текст |
| Ответ на | Re: Seqscan rather than Index (Frank Wiles <frank@wiles.org>) |
| Список | pgsql-performance |
On Fri, Dec 17, 2004 at 05:02:29PM -0600, Frank Wiles wrote: > It depends more on your disk IO than the processor. Counting isn't > processor intensive, but reading through the entire table on disk > is. I've also seen a huge difference between select count(*) and > select count(1) in older versions, haven't tried it on a recent > version however. Like I said, all in cache, so no disk IO. count(*) and count(1) give me identical results. (BTW, I don't think this is a count problem, it's a "sequential scan" problem -- I'm just trying to find out if this is natural or not, ie. if this is just something I have to expect in a relational database, even with no I/O.) /* Steinar */ -- Homepage: http://www.sesse.net/
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера