Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id CAB1ABBDD52 for ; Fri, 18 Nov 2011 10:09:59 -0400 (AST) Received: from mail2.sdb.it ([85.37.147.67]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RRP8d-0005tF-Lh for pgsql-admin@postgresql.org; Fri, 18 Nov 2011 14:09:59 +0000 Received: by mail2.sdb.it (Postfix, from userid 500) id 8F0AC80F9; Fri, 18 Nov 2011 15:09:42 +0100 (CET) Received: from geronimo.sdb.it (geronimo.sdb.it [10.101.1.20]) by mail2.sdb.it (Postfix) with ESMTP id 8A7878051 for ; Fri, 18 Nov 2011 15:09:42 +0100 (CET) Received: from mailtech.sdb.it (localhost [127.0.0.1]) by geronimo.sdb.it (Postfix) with ESMTP id 9D8DD38086E for ; Fri, 18 Nov 2011 15:09:32 +0100 (CET) Received: from [10.118.101.88] (silviob.sdb.it [10.118.101.88]) by mailtech.sdb.it (Postfix) with ESMTP id 5672F60063 for ; Fri, 18 Nov 2011 15:03:48 +0100 (CET) Message-ID: <4EC66726.6060800@tech.sdb.it> Date: Fri, 18 Nov 2011 15:09:42 +0100 From: Silvio Brandani User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: database not using indexes, yet References: <4EBA9AAC.9030900@tech.sdb.it> In-Reply-To: <4EBA9AAC.9030900@tech.sdb.it> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Private-Material: Please read notice X-Archive-Number: 201111/97 X-Sequence-Number: 38691 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 = '3145'; QUERY PLAN ---------------------------------------------------------------------------------------------------------------- Seq Scan on aida_references (cost=0.00..51489.15 rows=1 width=4) (actual time=0.173..1457.643 rows=1 loops=1) Filter: (aida_reference_id = 3145) Total runtime: 1457.696 ms already executed the vacuum ,reindex. Please help -- Silvio Brandani --- Utilizziamo i dati personali che la riguardano esclusivamente per nostre finalitą amministrative e contabili, anche quando li comunichiamo a terzi. Informazioni dettagliate, anche in ordine al Suo diritto di accesso e agli altri Suoi diritti, sono riportate alla pagina http://www.savinodelbene.com/privacy.html Se avete ricevuto questo messaggio per errore Vi preghiamo di ritornarlo al mittente eliminandolo assieme agli eventuali allegati, ai sensi art. 616 codice penale http://www.savinodelbene.com/privacy/codice_penale_616.html L'Azienda non si assume alcuna responsabilitą giuridica qualora pervengano da questo indirizzo messaggi estranei all'attivitą lavorativa o contrari a norme. --