From: | Jona <jonanews(at)oismail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Bad choice of query plan from PG 7.3.6 to PG 7.3.9 |
Date: | 2005-05-08 11:10:09 |
Message-ID: | 427DF391.9060708@oismail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Sorry Tom, misread your mail! My bad :-(
I believe the following is the data you need ?
Live Server
relname relpages
ctp_statcon 72
statcon_pk 135
Test Server
relname relpages
ctp_statcon 34
statcon_pk 28
Have executed the following query to obtain that data:
SELECT relname, relpages
FROM pg_class
WHERE relname = 'statcon_pk' OR relname = 'sc2ctp_fk' OR relname =
'sc2mtp_fk' OR relname = 'sc2sc_fk' OR relname = 'ctp_statcon'
The size difference for the index is surprisingly big I think,
considering that there's only around 1000 rows more in the table on the
live server than on the server.
Count for Live Server: 12597
Count for Test Server: 11494
Any insight into this?
Cheers
Jona
PS: The meta data for the table is:
CREATE TABLE statcon_tbl
(
id serial NOT NULL,
data bytea,
wm bool DEFAULT 'FALSE',
created timestamp DEFAULT now(),
modified timestamp DEFAULT now(),
enabled bool DEFAULT 'TRUE',
bitsperpixel int4 DEFAULT 0,
mtpid int4,
sctid int4,
ctpid int4,
CONSTRAINT statcon_pk PRIMARY KEY (id),
CONSTRAINT sc2ctp_fk FOREIGN KEY (ctpid) REFERENCES contype_tbl (id)
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT sc2mtp_fk FOREIGN KEY (mtpid) REFERENCES mimetype_tbl (id)
ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT sc2sct_fk FOREIGN KEY (sctid) REFERENCES statcontrans_tbl
(id) ON UPDATE CASCADE ON DELETE CASCADE
)
WITHOUT OIDS;
CREATE INDEX ctp_statcon ON statcon_tbl USING btree (sctid, ctpid);
Tom Lane wrote:
>Jona <jonanews(at)oismail(dot)com> writes:
>
>
>>anyway, here's the info for relpages:
>>Live Server: 424
>>Test Server: 338
>>
>>
>
>I was asking about the indexes associated with the table, not the table
>itself.
>
> regards, tom lane
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | John A Meinel | 2005-05-08 13:44:28 | Re: sequence scan on PK |
Previous Message | Tom Lane | 2005-05-07 22:55:45 | Re: [SQL] ORDER BY Optimization |