Re: Slow Inserts on 1 table? - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Slow Inserts on 1 table?
Date
Msg-id 42EF865D.9000904@commandprompt.com
Whole thread Raw
In response to Re: Slow Inserts on 1 table?  (Dan Armbrust <daniel.armbrust.list@gmail.com>)
Responses Re: Slow Inserts on 1 table?  (Dan Armbrust <daniel.armbrust.list@gmail.com>)
List pgsql-general
> Why can't postgres compile some rough statistics on tables without
> running analyze?

Why can't you just run analyze? You don't have to empty the tables to do
so and you can alter the statistics on the fly. Heck you can even run
analyze while doing the inserts.

Perhaps the fine manual would be of assistance?

http://www.postgresql.org/docs/8.0/interactive/sql-analyze.html
http://www.postgresql.org/docs/8.0/interactive/sql-altertable.html

> I have already had to disable sequential scans, since the planner is
> almost _always_ wrong in deciding whether or not to use an index.

Sounds again like you are not setting up your statistics correctly or
running analyze as and when it should.

Sincerely,

Joshua D. Drake



--
Your PostgreSQL solutions provider, Command Prompt, Inc.
24x7 support - 1.800.492.2240, programming, and consulting
Home of PostgreSQL Replicator, plPHP, plPerlNG and pgPHPToolkit
http://www.commandprompt.com / http://www.postgresql.org

pgsql-general by date:

Previous
From: "John D. Burger"
Date:
Subject: Re: Slow Inserts on 1 table?
Next
From: Dan Armbrust
Date:
Subject: Re: Slow Inserts on 1 table?