Re: [GENERAL] disable seqscan

2011-05-24 Thread Alban Hertroys
On 24 May 2011, at 8:22, Nick Raj wrote: > One think i am not able to understand is, if i use ndpoint_overlap method it > is going for seq. scan every time but if i use && operator it is using index > scan. Why it is so? > Why these is happening? Tom already explained that, but in short: Becaus

Re: [GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
On Mon, May 23, 2011 at 7:35 PM, Tom Lane wrote: > Nick Raj writes: > >> Andrew Sullivan wrote: > >>> It sounds like your index can't actually be used to satisfy your > >>> query. Without seeing the table definition, index definition, and > >>> query, however, it's pretty hard to give you a re

Re: [GENERAL] disable seqscan

2011-05-23 Thread Tom Lane
Nick Raj writes: >> Andrew Sullivan wrote: >>> It sounds like your index can't actually be used to satisfy your >>> query. Without seeing the table definition, index definition, and >>> query, however, it's pretty hard to give you a real answer. >> explain analyze select * from vehicle_stindex

Re: [GENERAL] disable seqscan

2011-05-23 Thread Andreas Kretschmer
Nick Raj wrote: > > On Mon, May 23, 2011 at 5:44 PM, Andreas Kretschmer > > wrote: > > Andrew Sullivan wrote: > > > On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > > > Hi, > > > I have build an index. When, i execute the query, it gives the result > by >

Re: [GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
On Mon, May 23, 2011 at 5:44 PM, Andreas Kretschmer < akretsch...@spamfence.net> wrote: > Andrew Sullivan wrote: > > > On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > > > Hi, > > > I have build an index. When, i execute the query, it gives the result > by > > > sequential scan, not by

Re: [GENERAL] disable seqscan

2011-05-23 Thread Andreas Kretschmer
Andrew Sullivan wrote: > On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > > Hi, > > I have build an index. When, i execute the query, it gives the result by > > sequential scan, not by using my index. > > > For that, i have set enable_seqscan=off in postgresql.conf. But it still > > g

Re: [GENERAL] disable seqscan

2011-05-23 Thread Andrew Sullivan
On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > Hi, > I have build an index. When, i execute the query, it gives the result by > sequential scan, not by using my index. > For that, i have set enable_seqscan=off in postgresql.conf. But it still > going through sequential scan. It sound

[GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
Hi, I have build an index. When, i execute the query, it gives the result by sequential scan, not by using my index. I have already run vacuum analyze to collect some statistics regarding table. May be sequential scan is giving faster execution time than my indexing. But i want to know how much ti