pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Shanny <shannyconsulting@earthlink.net>
To: pgsql-performance@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Question about difference in performance of 2 queries
Date: Mon, 29 Dec 2003 13:46:09 -0500
Message-ID: <3FF07671.7050706@earthlink.net> (raw)
In-Reply-To: <15476.1072716487@sss.pgh.pa.us>
References: <3FF057DF.7000605@earthlink.net>
	<15476.1072716487@sss.pgh.pa.us>

Here is the pg_stats data.  The explain analyze queries are still running.

select * from pg_stats where tablename = 'f_pageviews' and attname = 
'date_key';
 schemaname |  tablename  | attname  | null_frac | avg_width | 
n_distinct |             most_common_vals              
|                                         
most_common_freqs                                         
|               histogram_bounds                | correlation
------------+-------------+----------+-----------+-----------+------------+-------------------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------+-------------
 public     | f_pageviews | date_key |         0 |         4 |         
60 | {335,307,309,336,308,321,314,342,322,316} | 
{0.0283333,0.0243333,0.0243333,0.0243333,0.024,0.0233333,0.0226667,0.0226667,0.0223333,0.0216667} 
| {304,311,318,325,329,334,341,346,351,356,363} |    0.345026
(1 row)

select * from pg_stats where tablename = 'f_pageviews' and attname = 
'content_key';
 schemaname |  tablename  |   attname   | null_frac | avg_width | 
n_distinct | most_common_vals |   most_common_freqs   
|                                  
histogram_bounds                                   | correlation
------------+-------------+-------------+-----------+-----------+------------+------------------+-----------------------+-------------------------------------------------------------------------------------+-------------
 public     | f_pageviews | content_key |         0 |         4 |        
983 | {-1,1528483}     | {0.749333,0.00166667} | 
{38966,323835,590676,717061,919148,1091875,1208244,1299702,1375366,1434079,1528910} 
|    0.103399
(1 row)

Thanks.

--sean


Tom Lane wrote:

>Please show EXPLAIN ANALYZE output for your queries, not just EXPLAIN.
>Also it would be useful to see the pg_stats rows for the date_key and
>content_key columns.
>
>			regards, tom lane
>
>  
>




view thread (9+ messages)  latest in thread

Message-ID: <3FF07671.7050706@earthlink.net>
Permalink:  ../3FF07671.7050706@earthlink.net/
Also on:    postgresql.org/message-id/3FF07671.7050706@earthlink.net

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: shannyconsulting@earthlink.net, tgl@sss.pgh.pa.us
  Subject: Re: Question about difference in performance of 2 queries
  In-Reply-To: <3FF07671.7050706@earthlink.net>

* 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