Re: Fragmenting tables in postgres - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fragmenting tables in postgres
Date
Msg-id 2223.1001612278@sss.pgh.pa.us
Whole thread Raw
In response to Fragmenting tables in postgres  (karthikg@yahoo.com (Karthik Guruswamy))
Responses Re: Fragmenting tables in postgres  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
karthikg@yahoo.com (Karthik Guruswamy) writes:
> Anyone tried fragmenting tables into multiple sub tables 
> transparently through Postgres rewrite rules ? I'm having 
> a table with 200,000 rows with varchar columns and noticed 
> that updates,inserts take a lot longer time compared to a 
> few rows in the same table.

That's not a very big table ... there's no reason for inserts to
take a long time, and not much reason for updates to take long either
if you have appropriate indexes to help find the rows to be updated.
Have you VACUUM ANALYZEd this table recently (or ever?)  Have you
tried EXPLAINing the queries to see if they use indexes?

> I have a lot of memory in my 
> machine like 2Gig and 600,000 buffers. 

You mean you set -B to 600000?  That's not a bright idea.  A few
thousand will be plenty, and will probably perform lots better.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Moving CVS files around?
Next
From: Rene Pijlman
Date:
Subject: Re: [Fwd: Re: JDBC update wont, plz help.]