Re: [GENERAL] disable seqscan

2011-05-24 Thread Nick Raj
On Mon, May 23, 2011 at 7:35 PM, Tom Lane t...@sss.pgh.pa.us wrote: Nick Raj nickrajj...@gmail.com writes: Andrew Sullivan a...@crankycanuck.ca wrote: It sounds like your index can't actually be used to satisfy your query. Without seeing the table definition, index definition, and

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: Because a

[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

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 sounds

Re: [GENERAL] disable seqscan

2011-05-23 Thread Andreas Kretschmer
Andrew Sullivan a...@crankycanuck.ca 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

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 a...@crankycanuck.ca 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,

Re: [GENERAL] disable seqscan

2011-05-23 Thread Andreas Kretschmer
Nick Raj nickrajj...@gmail.com wrote: On Mon, May 23, 2011 at 5:44 PM, Andreas Kretschmer akretsch...@spamfence.net wrote: Andrew Sullivan a...@crankycanuck.ca wrote: On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: Hi, I have build an index. When, i

Re: [GENERAL] disable seqscan

2011-05-23 Thread Tom Lane
Nick Raj nickrajj...@gmail.com writes: Andrew Sullivan a...@crankycanuck.ca 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