From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Ben <bench(at)silentmedia(dot)com> |
Cc: | PostgreSQL general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: a question for the way-back machine |
Date: | 2006-12-13 21:19:50 |
Message-ID: | 20061213211950.GD15546@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Rafal Pietrak | 2006-12-13 21:36:55 | Re: about the RULE system |
Previous Message | Karsten Hilbert | 2006-12-13 21:16:38 | Re: Large IN query optimization |