On Tue, Jan 29, 2013 at 8:41 AM, Alex Vinnik <alvinnik.g@xxxxxxxxx> wrote: > Setting work_mem to 64MB triggers in memory sort but look what happens with > views look up. PG goes through all records there "Seq Scan on views" instead > of using visitor_id index and I have only subset of real data to play > around. Can imagine what cost would be running it against bigger dataset. > Something else is in play here that makes planner to take this route. Any > ideas how to gain more insight into planner's inner workings? did you set effective_cache_seize as noted upthread? merlin -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance