Search Postgresql Archives

Re: a question for the way-back machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux