Re: [GENERAL] Indexes works only on miss

2006-01-06 Thread Jim C. Nasby
You might need to increase the statistics target (for that table or for the cluster), and/or decrease random_page_cost (most folks find something between 2 and 3 to perform the best). On Fri, Jan 06, 2006 at 07:07:54PM +0100, Sebastjan Trepca wrote: > Thank you for exhaustive explanation, this is

Re: [GENERAL] Indexes works only on miss

2006-01-06 Thread Sebastjan Trepca
Thank you for exhaustive explanation, this is the output with analyze :"Seq Scan on test  (cost=0.00..120.67 rows=627 width=11) (actual time=0.018..5.467 rows=621 loops=1)""  Filter: (("Owner")::text = 'root'::text)" "Total runtime: 7.288 ms""Index Scan using idx_test_owner on test  (cost=0.00..96.

Re: [GENERAL] Indexes works only on miss

2006-01-06 Thread Michael Fuhr
On Fri, Jan 06, 2006 at 05:42:41PM +0100, Sebastjan Trepca wrote: > I really don't understand this behaviour. I have a table with column "owner" > on which I created an index with btree method. The table contains around 3k > rows. > > Now I run it using EXPLAIN command. Please post the EXPLAIN AN

Re: [GENERAL] Indexes works only on miss

2006-01-06 Thread Tom Lane
Sebastjan Trepca <[EMAIL PROTECTED]> writes: > "Seq Scan on test (cost=0.00..119.11 rows=263 width=11)" > " Filter: (("Owner")::text = 'root'::text)" > "Index Scan using idx_test_owner on test (cost=0.00..96.56 rows=28 > width=11)" > " Index Cond: (("Owner")::text = 'blah'::text)" > Why is th

[GENERAL] Indexes works only on miss

2006-01-06 Thread Sebastjan Trepca
Hi,I really don't understand this behaviour. I have a table with column "owner" on which I created an index with btree method. The table contains around 3k rows.Now I run it using EXPLAIN command. This query has some results:explain SELECT "Name" FROM test WHERE "Owner"='root'"Seq Scan on test  (co