Re: Performance question 83 GB Table 150 million rows, distinct select

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux