[GENERAL] Seq Scan cost shown to be (cost=10000000000.00..10000000001.10)

2013-05-27 Thread Amit Langote
Hello, I set enable_seqscan=off and also accidentally dropped the only index on a table (actually, drop extension pg_bigm cascade) and observe following: postgres=# explain select * from testdata where name like '%gi%'; QUERY PLAN

Re: [GENERAL] Seq Scan cost shown to be (cost=10000000000.00..10000000001.10)

2013-05-27 Thread Sergey Konoplev
On Mon, May 27, 2013 at 12:42 AM, Amit Langote amitlangot...@gmail.com wrote: I set enable_seqscan=off and also accidentally dropped the only index [...] Seq Scan on testdata (cost=100.00..101.10 rows=2 width=71) [...] Although, I suspect the (dropped index + enable_seqscan)

Re: [GENERAL] Seq Scan cost shown to be (cost=10000000000.00..10000000001.10)

2013-05-27 Thread Victor Yegorov
2013/5/27 Amit Langote amitlangot...@gmail.com Although, I suspect the (dropped index + enable_seqscan) causes this, is the cost shown in explain output some kind of default max or something like that for such abnormal cases? When one uses “enable_” settings to adjust planner behavior,

Re: [GENERAL] Seq Scan cost shown to be (cost=10000000000.00..10000000001.10)

2013-05-27 Thread Amit Langote
Although, I suspect the (dropped index + enable_seqscan) causes this, is the cost shown in explain output some kind of default max or something like that for such abnormal cases? When you set enable_xxx=off, it not actually disables the xxx operation, it sets the start cost to the high value

Re: [GENERAL] Seq Scan cost shown to be (cost=10000000000.00..10000000001.10)

2013-05-27 Thread Amit Langote
When one uses “enable_” settings to adjust planner behavior, PostgreSQL just sets really high costs for the operations affected (like the one you see). As SeqScan is the only possible way to execute your query, it is still choosen. I get it. Thanks! -- Amit Langote -- Sent via