> How many rows in usage_access?
Oh, I just got my explain analyze:
QUERY
PLAN
----------------------------------------------------------------------------
--------------------------------------------------------------------------
Subquery Scan "*SELECT*" (cost=9499707.90..9856491.74 rows=3567838
width=28) (actual time=11443537.58..12470835.17 rows=1198141 loops=1)
-> Aggregate (cost=9499707.90..9856491.74 rows=3567838 width=28)
(actual time=11443537.56..12466550.25 rows=1198141 loops=1)
-> Group (cost=9499707.90..9767295.78 rows=35678384 width=28)
(actual time=11443537.10..12408372.26 rows=35678383 loops=1)
-> Sort (cost=9499707.90..9588903.86 rows=35678384
width=28) (actual time=11443537.07..12035366.31 rows=35678383 loops=1)
Sort Key: accountid, sessionid
-> Seq Scan on usage_access (cost=0.00..1018901.84
rows=35678384 width=28) (actual time=8.13..416580.35 rows=35678383 loops=1)
Total runtime: 12625498.84 msec
(7 rows)
--
Matthew Nuzum <matt@followers.net>
www.followers.net - Makers of "Elite Content Management System"
View samples of Elite CMS in action by visiting
http://www.followers.net/portfolio/