From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, <pgsql-performance(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: [SQL] [PERFORM] 7.3.1 index use / performance |
Date: | 2003-01-07 21:05:22 |
Message-ID: | Pine.LNX.4.44.0301071856280.9324-200000@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-performance pgsql-sql |
On Tue, 7 Jan 2003, Tom Lane wrote:
> Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> writes:
> > About the stats on these 3 columns i get:
>
> Does 7.2 generate the same stats? (minus the schemaname of course)
Not absolutely but close:
(See attachment)
>
> Also, I would like to see the results of these queries on both versions,
> so that we can see what the planner thinks the index selectivity is:
>
> EXPLAIN ANALYZE select * from noon where
> v_code='4500';
>
> EXPLAIN ANALYZE select * from noon where
> report_date between '2002-01-07' and '2003-01-07';
>
On 7.3.1 (On a FreeBSD)
=======================
dynacom=# EXPLAIN ANALYZE select * from noon where v_code='4500';
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------
Index Scan using noonf_vcode on noon (cost=0.00..3066.64 rows=829
width=1974) (actual time=2.02..1421.14 rows=792 loops=1)
Index Cond: (v_code = '4500'::character varying)
Total runtime: 1424.82 msec
(3 rows)
dynacom=# EXPLAIN ANALYZE select * from noon where report_date between
'2002-01-07' and '2003-01-07';
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------
Index Scan using noonf_date on noon (cost=0.00..15919.50 rows=11139
width=1974) (actual time=2.05..13746.17 rows=7690 loops=1)
Index Cond: ((report_date >= '2002-01-07'::date) AND (report_date <=
'2003-01-07'::date))
Total runtime: 13775.48 msec
(3 rows)
On 7.2.3 (Linux)
==================
dynacom=# EXPLAIN ANALYZE select * from noon where v_code='4500';
NOTICE: QUERY PLAN:
Index Scan using noonf_vcode on noon (cost=0.00..3043.45 rows=827
width=1974) (actual time=19.59..927.06 rows=792 loops=1)
Total runtime: 928.86 msec
dynacom=# EXPLAIN ANALYZE select * from noon where report_date between
'2002-01-07' and '2003-01-07';
NOTICE: QUERY PLAN:
Index Scan using noonf_date on noon (cost=0.00..16426.45 rows=11958
width=1974) (actual time=29.64..8854.05 rows=7690 loops=1)
Total runtime: 8861.90 msec
EXPLAIN
> regards, tom lane
>
==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-10-8981112
fax: +30-10-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr
Attachment | Content-Type | Size |
---|---|---|
querystats_on_7.2.3 | text/plain | 2.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleus Mantzios | 2003-01-07 21:55:33 | 7.3.1 function problem: ERROR: cache lookup failed for type 0 |
Previous Message | Joe Conway | 2003-01-07 20:59:10 | Re: Binary data migration from MSSQL |
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleus Mantzios | 2003-01-07 21:55:33 | 7.3.1 function problem: ERROR: cache lookup failed for type 0 |
Previous Message | Claiborne, Aldemaco Earl (Al) | 2003-01-07 20:29:54 | path |
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleus Mantzios | 2003-01-07 21:55:33 | 7.3.1 function problem: ERROR: cache lookup failed for type 0 |
Previous Message | Achilleus Mantzios | 2003-01-07 20:27:32 | Re: [SQL] [PERFORM] 7.3.1 index use / performance |