Re: [ADMIN] database not using indexes, yet

2011-11-18 Thread Tom Lane
Silvio Brandani writes: > Il 18/11/2011 15.51, Tom Lane ha scritto: >> There's nothing here to suggest that this query shouldn't use an index, >> so the problem is in something you didn't show us. Maybe you have >> enable_indexscan turned off, or maybe that index isn't really on that >> table, or

Re: [ADMIN] database not using indexes, yet

2011-11-18 Thread Silvio Brandani
Il 18/11/2011 15.51, Tom Lane ha scritto: Silvio Brandani writes: On postgres 8.3.11 on linux centos 5 we have a table not too big with primary key index on Indexes: "aida_references_pkey" PRIMARY KEY, btree (aida_reference_id) the query not use index: aidadb=# explain analyze select a

Re: [ADMIN] database not using indexes, yet

2011-11-18 Thread Tom Lane
Silvio Brandani writes: > On postgres 8.3.11 on linux centos 5 we have a table not too big with > primary key index on > Indexes: > "aida_references_pkey" PRIMARY KEY, btree (aida_reference_id) > the query not use index: > aidadb=# explain analyze select aida_reference_id from > aida.

Re: [ADMIN] database not using indexes, yet

2011-11-18 Thread Silvio Brandani
table is 959818 records, I create a copy of the table with create tabase as select ... and then indexed, the new table use the indexes ... thanks Il 18/11/2011 15.19, Szymon Guz ha scritto: 2011/11/18 Silvio Brandani > On postgres 8.3.11 on linu

Re: [ADMIN] database not using indexes, yet

2011-11-18 Thread Szymon Guz
2011/11/18 Silvio Brandani > On postgres 8.3.11 on linux centos 5 we have a table not too big with > primary key index on > > Indexes: >"aida_references_pkey" PRIMARY KEY, btree (aida_reference_id) > > the query not use index: > > aidadb=# explain analyze select aida_reference_id from > ai

[ADMIN] database not using indexes, yet

2011-11-18 Thread Silvio Brandani
On postgres 8.3.11 on linux centos 5 we have a table not too big with primary key index on Indexes: "aida_references_pkey" PRIMARY KEY, btree (aida_reference_id) the query not use index: aidadb=# explain analyze select aida_reference_id from aida.aida_references where aida_reference_id