Re: Performance question 83 GB Table 150 million rows, distinct select - Mailing list pgsql-performance

From Tory M Blue
Subject Re: Performance question 83 GB Table 150 million rows, distinct select
Date
Msg-id CAEaSS0btTbnEBkGd9pOtTG9jqnr+2qynSCAQrRRa33CCBOByqA@mail.gmail.com
Whole thread Raw
In response to Re: Performance question 83 GB Table 150 million rows, distinct select  ("Tomas Vondra" <tv@fuzzy.cz>)
List pgsql-performance
Thanks all,  I misspoke on our use of the index.

We do have an index on log_date and it is being used here is the
explain analyze plan.



'Aggregate  (cost=7266186.16..7266186.17 rows=1 width=8) (actual
time=127575.030..127575.030 rows=1 loops=1)'
'  ->  Bitmap Heap Scan on userstats  (cost=135183.17..7240890.38
rows=10118312 width=8) (actual time=8986.425..74815.790 rows=33084417
loops=1)'
'        Recheck Cond: (log_date > '2011-11-04'::date)'
'        ->  Bitmap Index Scan on idx_userstats_logdate
(cost=0.00..132653.59 rows=10118312 width=0) (actual
time=8404.147..8404.147 rows=33084417 loops=1)'
'              Index Cond: (log_date > '2011-11-04'::date)'
'Total runtime: 127583.898 ms'

Partitioning Tables

This is use primarily when you are usually accessing only a part of
the data. We want our queries to go across the entire date range.  So
we don't really meet the criteria for partitioning (had to do some
quick research).

Thanks again
Tory

pgsql-performance by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: Performance question 83 GB Table 150 million rows, distinct select
Next
From: Scott Marlowe
Date:
Subject: Re: Performance question 83 GB Table 150 million rows, distinct select