Re: Question about difference in performance of 2 queries
От | Sean Shanny |
---|---|
Тема | Re: Question about difference in performance of 2 queries |
Дата | |
Msg-id | 3FF07671.7050706@earthlink.net обсуждение исходный текст |
Ответ на | Re: Question about difference in performance of 2 queries on large table (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Question about difference in performance of 2 queries
|
Список | pgsql-performance |
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 > > >
В списке pgsql-performance по дате отправления: