Sequential Scans
От | Ericson Smith |
---|---|
Тема | Sequential Scans |
Дата | |
Msg-id | 1046985347.8422.13.camel@localhost.localdomain обсуждение исходный текст |
Ответы |
Re: Sequential Scans
|
Список | pgsql-general |
Hi, I have a table with about 3.2 Million records. There is one process that I run that needs to process batches of records 1000 at a time out of a set of approximately 220,000 records. So my query looks like this: SELECT a.*, b.url FROM listings a, urls b WHERE a.urlindex=b.index AND a.haslid=1 ORDER BY a.index LIMIT 1000 OFFSET 0; Doing the above query with an offset of up to 5000 (the 5th batch) shows (with EXPLAIN) that index scans are being used. Exceeding an OFFSET of 5000 produces sequential scans. The whole process goes horribly slow at that point. Any suggestions as to what may be causing this? My environment: * RH 7.3 // Postgresql 7.3.x // Latest Kernel from RH * RAM 6 Gigs * Dual Xeon CPU's * Shared Ram 250MB * VACUUM / ANALYZE run twice per day * The tables in question are mostly static (.05% updates, 1% inserts daily) - Ericson Smith eric@did-it.com -- Ericson Smith <eric@did-it.com>
В списке pgsql-general по дате отправления: