Re: "select count(*) from contacts" is too slow!
Вложения
В списке pgsql-general по дате отправления:
| От | Ang Chin Han |
|---|---|
| Тема | Re: "select count(*) from contacts" is too slow! |
| Дата | |
| Msg-id | 3F84E152.6090402@bytecraft.com.my обсуждение исходный текст |
| Ответ на | Re: "select count(*) from contacts" is too slow! (Christopher Browne <cbbrowne@acm.org>) |
| Ответы |
Re: "select count(*) from contacts" is too slow!
|
| Список | pgsql-general |
Christopher Browne wrote: > A long time ago, in a galaxy far, far away, nolan@celery.tssi.com wrote: > >>>MySQL can tell you from it's index because it doesn't care if it gives you the >>>right number or not. >> >>Under what circumstances would MySQL give the wrong number? > > > It would give the wrong number under _every_ circumstance where there > are uncommitted INSERTs or DELETEs. Give them some credit. I just double checked: Using mysql 4.0.14 + innodb and transactions, select count(*) from foo; does not count uncommited INSERTs. Heck, even using myisam, mysql's count(*)'s still accurate, since all INSERTs, etc are autocommitted. -- Linux homer 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux 12:00pm up 287 days, 3:33, 7 users, load average: 6.93, 6.31, 6.16
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера