| От | 旭斌 裴 |
|---|---|
| Тема | table full scan or index full scan? |
| Дата | |
| Msg-id | 898467.5890.qm@web15005.mail.cnb.yahoo.com обсуждение исходный текст |
| Ответы |
Re: table full scan or index full scan?
Re: table full scan or index full scan? |
| Список | pgsql-performance |
I have a 30,000,000 records table, counts the record number to need for 40 seconds. The table has a primary key on column id; perf=# explain select count(*) from test; ... ----------------------------------------- Aggregate (cost=603702.80..603702.81 rows=1 width=0) -> Seq scan on test (cost=0.00..527681.04 rows=30408704 width=0) ... perf=# select count(*) from test; count ------------ 30408704 perf=# The postgresql database uses the table full scan.but in oracle, the similar SQL uses the index full scanning,speed quickly many than postgresql. postgresql's optimizer whether to have the necessity to make the adjustment? |
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера