Re: [PERFORM] Index usage with sub select or inner joins

2008-11-12 Thread Joshua Tolley
On Wed, Nov 12, 2008 at 02:22:47PM +0100, Julien Theulier wrote: > QUESTION: Why the planner choose seq scan in the first case & indexes scan > in the second case? In a more general way, I observed that the planner has > difficulties to select index scans & does in almost all the cases seq scan, >

[PERFORM] Index usage with sub select or inner joins

2008-11-12 Thread Julien Theulier
Hello, I am doing some performances testing on Postgres & I discovered the following behavior, when using 2 different ways of writing selects (but doing the same aggregations at the end): 1. test case 1, using outer join: create table test2 as select soj_session_log_id, pv_timestamp, vi_pv_id,a.i