Re: [GENERAL] Question on Explain : Index Scan

2010-10-22 Thread Mathieu De Zutter
On Thu, Oct 21, 2010 at 8:51 PM, DM wrote: > Why is the difference in query plan, and the total runtime. Both tables have > the sameĀ  btree index > > > test=# explain analyze select * from test_seqindex1 where sid='AA023'; > QUERY > PLAN

Re: [GENERAL] Question on Explain : Index Scan

2010-10-21 Thread DM
*Why is the difference in query plan, and the total runtime. Both tables have the same btree index* test=# explain analyze select * from test_seqindex1 where sid='AA023'; QUERY PLAN -

Re: [GENERAL] Question on Explain : Index Scan

2010-10-21 Thread DM
perfecto, thank you for the explanation. - Deepak On Thu, Oct 21, 2010 at 3:20 AM, Mathieu De Zutter wrote: > On Thu, Oct 21, 2010 at 3:47 AM, DM wrote: > > I was hoping the optimizer would do a join using index scan. > > > > Could some one please explain me why its not doing an index scan rath

Re: [GENERAL] Question on Explain : Index Scan

2010-10-21 Thread Mathieu De Zutter
On Thu, Oct 21, 2010 at 3:47 AM, DM wrote: > I was hoping the optimizer would do a join using index scan. > > Could some one please explain me why its not doing an index scan rather than > sequential scan . A index scan would be probably slower here because you're asking for a lot of rows. A lot

[GENERAL] Question on Explain : Index Scan

2010-10-20 Thread DM
Question on Index scan: ---> test=# \d test_seqindex1 Table "public.test_seqindex1" Column | Type | Modifiers +---+--- sid| character varying(13) | not null nam