Re: Table partition for very large table - Mailing list pgsql-general

From Yudie Gunawan
Subject Re: Table partition for very large table
Date
Msg-id e460d0c05032811024ad44f31@mail.gmail.com
Whole thread Raw
In response to Table partition for very large table  (Yudie Gunawan <yudiepg@gmail.com>)
Responses Re: Table partition for very large table  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-general
I actualy need to join from 2 tables. Both of them similar and has
more than 4 millions records.

CREATE TABLE prdt_old (
 groupnum int4 NOT NULL,
 sku varchar(30) NOT NULL,
 url varchar(150),
);

CREATE TABLE prdt_new(
 groupnum int4 NOT NULL,
 sku varchar(30) NOT NULL,
 url varchar(150) NOT NULL,
);

The query returns group number and sku from old table where has no url
in prdt_new table.

INSERT into prdtexpired
SELECT pn.groupnum, pn.sku
 FROM prdt_old po
 LEFT OUTER JOIN prdt_new pn
   ON (pn.groupnum = po.groupnum and pn.sku = po.sku)
WHERE pn.url is null or pn.url= '';

I already have resolution for this problem where I seperate the query
for each group.

But when I address this question, I hope that Postgresql has some kind
of table optimazion for large records. Based my experience it is
faster to query from chopped smaller table rather than query from
single huge table. I heard Oracle has some kind of table partition
that acts like single table.

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: LWM 2004 Readers' Choice Nomination
Next
From: Avishai Weissberg
Date:
Subject: general purpose full text indexing