From: | Gene <genekhart(at)gmail(dot)com> |
---|---|
To: | "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Maintaining cluster order on insert |
Date: | 2006-08-10 01:31:49 |
Message-ID: | 430d92a20608091831w6e59da84k48a58110cb98e8d6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
I have a table that inserts lots of rows (million+ per day) int8 as primary
key, and I cluster by a timestamp which is approximately the timestamp of
the insert beforehand and is therefore in increasing order and doesn't
change. Most of the rows are updated about 3 times over time roughly within
the next 30 minutes. Should I assume that that all of these updates will be
on separate pages unless I perform a cluster (which takes a long time) and
performance will suffer due to this? Is it possible to preallocate space on
the same page for future updates (whatever the average number of updates may
be per row) decreasing the number of page loads for querying?
Gene
On 8/9/06, Jonah H. Harris <jonah(dot)harris(at)gmail(dot)com> wrote:
>
> On 8/9/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > UPDATE tries to place the new tuple on the same page it's already
> > on.
>
> I think he meant for INSERT.
>
> --
> Jonah H. Harris, Software Architect | phone: 732.331.1300
> EnterpriseDB Corporation | fax: 732.331.1301
> 33 Wood Ave S, 2nd Floor | jharris(at)enterprisedb(dot)com
> Iselin, New Jersey 08830 | http://www.enterprisedb.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--
Eugene Hart
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-08-10 01:35:21 | pgsql: Move "#define inline __inline" from port/win32.h to c.h because |
Previous Message | Hiroshi Saito | 2006-08-10 01:04:04 | Re: [GENERAL] WIN32 Build? |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-08-10 01:56:49 | Re: pgstattuple extension for indexes |
Previous Message | Bruce Momjian | 2006-08-10 00:44:34 | Re: Fix statement timing display |