slow select in big table

Поиск
Список
Период
Сортировка
От rafalak
Тема slow select in big table
Дата
Msg-id 39582c42-c0ae-44ba-a34e-dc1a1d2d5bd3@g19g2000yql.googlegroups.com
обсуждение исходный текст
Ответы Re: slow select in big table  (Abbas <abbas.dba@gmail.com>)
Re: slow select in big table  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
Hello i have big table
80mln records, ~6GB data, 2columns (int, int)

if query
select count(col1) from tab where col2=1234;
return low records (1-10) time is good 30-40ms
but when records is >1000 time is >12s


How to increse performace ?


my postgresql.conf
shared_buffers = 810MB
temp_buffers = 128MB
work_mem = 512MB
maintenance_work_mem = 256MB
max_stack_depth = 7MB
effective_cache_size = 800MB


db 8.3.7
server, atlon dual-core 2,0Ghz, 2GB RAM, SATA


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

Предыдущее
От: Ricardo Fuentes
Дата:
Сообщение: Hello, i want to subscribe...
Следующее
От: Patrick Desjardins
Дата:
Сообщение: Re: [GENERAL] Re: [GENERAL] ERROR: XX001: could not read block 2354 of relation…