Re: Bad choice of query plan from PG 7.3.6 to PG 7.3.9 - Mailing list pgsql-performance

From Jona
Subject Re: Bad choice of query plan from PG 7.3.6 to PG 7.3.9
Date
Msg-id 427DF391.9060708@oismail.com
Whole thread Raw
In response to Re: Bad choice of query plan from PG 7.3.6 to PG 7.3.9  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Sorry Tom, misread your mail! My bad :-(

I believe the following is the data you need ?
Live Server
relnamerelpages
ctp_statcon72
statcon_pk135


Test Server
relnamerelpages
ctp_statcon34
statcon_pk28

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@oismail.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 

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] ORDER BY Optimization
Next
From: Jeroen van Iddekinge
Date:
Subject: sequence scan on PK