pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Susan Russo <russo@morgan.harvard.edu>
To: russo@morgan.harvard.edu
To: wmoran@collaborativefusion.com
Cc: harvsys@morgan.harvard.edu
Cc: pgsql-performance@postgresql.org
Subject: Re: REVISIT specific query (not all) on Pg8 MUCH slower than Pg7
Date: Thu, 10 May 2007 10:08:41 -0400 (EDT)
Message-ID: <200705101408.l4AE8fFt017962@larrys.harvard.edu> (raw )
>Quick reminders:
>*) Did you recreate all the indexes on the new system after the initdb?
>*) Did you vacuum and analyze after loading your data?
No, I didn't - am reindexing db now and will run vacuum analyze afterwards.
>I suggest you provide "explain analyze" output for the query on both versions.
Pg8:
-----------------------------------------------------------------
Merge Join (cost=151939.73..156342.67 rows=10131 width=1585) (actual time=0.129..0.129 rows=0 loops=1)
Merge Cond: ("outer".cvterm_id = "inner".type_id)
-> Index Scan using cvterm_pkey on cvterm cvt (cost=0.00..4168.22 rows=32478 width=520) (actual time=0.044..0.044 rows=1 loops=1)
Filter: (((name)::text <> 'gene'::text) AND ((name)::text <> 'protein'::text) AND ((name)::text <>
'natural_transposable_element'::text) AND ((name)::text <> 'chromosome_structure_variation'::text) AND ((name)::text <>
'chromosome_arm'::text) AND ((name)::text <> 'repeat_region'::text))
-> Sort (cost=151939.73..151965.83 rows=10441 width=1073) (actual time=0.079..0.079 rows=0 loops=1)
Sort Key: f.type_id
-> Nested Loop (cost=17495.27..151242.80 rows=10441 width=1073) (actual time=0.070..0.070 rows=0 loops=1)
-> Hash Join (cost=17495.27..88325.38 rows=10441 width=525) (actual time=0.068..0.068 rows=0 loops=1)
Hash Cond: ("outer".dbxref_id = "inner".dbxref_id)
-> Seq Scan on feature_dbxref fd (cost=0.00..34182.71 rows=2088171 width=9) (actual time=0.008..0.008 rows=1 loops=1)
-> Hash (cost=17466.34..17466.34 rows=11572 width=524) (actual time=0.042..0.042 rows=0 loops=1)
-> Bitmap Heap Scan on dbxref dx (cost=117.43..17466.34 rows=11572 width=524) (actual time=0.041..0.041 rows=0 loops=1)
Filter: ((accession)::text ~~ 'AY851043%'::text)
-> Bitmap Index Scan on dbxref_idx2 (cost=0.00..117.43 rows=11572 width=0) (actual time=0.037..0.037 rows=0 loops=1)
Index Cond: (((accession)::text >= 'AY851043'::character varying) AND ((accession)::text < 'AY851044'::character varying))
-> Index Scan using feature_pkey on feature f (cost=0.00..6.01 rows=1 width=556) (never executed)
Index Cond: ("outer".feature_id = f.feature_id)
Total runtime: 0.381 ms
(18 rows)
=======
Pg7:
-----------------------------------------------------------------------------------------------
Nested Loop (cost=0.00..23.45 rows=1 width=120) (actual time=0.08..0.08 rows=0 loops=1)
-> Nested Loop (cost=0.00..17.49 rows=1 width=82) (actual time=0.08..0.08 rows=0 loops=1)
-> Nested Loop (cost=0.00..11.93 rows=1 width=30) (actual time=0.08..0.08 rows=0 loops=1)
-> Index Scan using dbxref_idx2 on dbxref dx (cost=0.00..5.83 rows=1 width=21) (actual time=0.08..0.08 rows=0 loops=1)
Index Cond: ((accession >= 'AY851043'::character varying) AND (accession < 'AY851044'::character varying))
Filter: (accession ~~ 'AY851043%'::text)
-> Index Scan using feature_dbxref_idx2 on feature_dbxref fd (cost=0.00..6.05 rows=5 width=9) (never executed)
Index Cond: (fd.dbxref_id = "outer".dbxref_id)
-> Index Scan using feature_pkey on feature f (cost=0.00..5.54 rows=1 width=52) (never executed)
Index Cond: ("outer".feature_id = f.feature_id)
-> Index Scan using cvterm_pkey on cvterm cvt (cost=0.00..5.94 rows=1 width=38) (never executed)
Index Cond: ("outer".type_id = cvt.cvterm_id)
Filter: ((name <> 'gene'::character varying) AND (name <> 'protein'::character varying) AND (name <> 'natural_transposable_element'::character varying) AND (name <> 'chromosome_structure_variation'::character varying)
AND (name <> 'chromosome_arm'::character varying) AND (name <> 'repeat_region'::character varying))
Total runtime: 0.36 msec
(14 rows)
view thread (5+ messages) latest in thread
Message-ID: <200705101408.l4AE8fFt017962@larrys.harvard.edu>
Permalink: ../200705101408.l4AE8fFt017962@larrys.harvard.edu/
Also on: postgresql.org/message-id/200705101408.l4AE8fFt017962@larrys.harvard.edu
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: russo@morgan.harvard.edu, wmoran@collaborativefusion.com, harvsys@morgan.harvard.edu
Subject: Re: REVISIT specific query (not all) on Pg8 MUCH slower than Pg7
In-Reply-To: <200705101408.l4AE8fFt017962@larrys.harvard.edu>
References: <200705101408.l4AE8fFt017962@larrys.harvard.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox