Re: a question for the way-back machine
От | Martijn van Oosterhout |
---|---|
Тема | Re: a question for the way-back machine |
Дата | |
Msg-id | 20061213211950.GD15546@svana.org обсуждение исходный текст |
Ответ на | a question for the way-back machine (Ben <bench@silentmedia.com>) |
Ответы |
Re: a question for the way-back machine
|
Список | pgsql-general |
On Wed, Dec 13, 2006 at 01:10:44PM -0800, Ben wrote: > I'm using an ancient version of postgresql (7.3 - don't ask) and I'm > experiencing a problem where many inserts into an empty table slow down > over time, even if I analyze in the middle of the insertions. > pg_stat_user_tables shows lots and lots of full scans, which explains the > slowdown, but leads me to wonder why the full scans. Each insert is its > own transaction. This table has at least one unique index on it, and a > couple other multi-column indexes, so I was wondering if maybe that was > what was causing the full scans. But a an explain shows that a select for > that unique column will use the index, so now I'm wondering if maybe: > > - 7.3 isn't smart enough to use an index on an insert? Seems unlikely. This question makes no sense, you don't need an index to insert. Are you sure it's not due to some foreign key check? BTW, seperate inserts is the worst way to load data. At least put them within a single transaction, or use COPY. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Вложения
В списке pgsql-general по дате отправления: