X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 92792535BC for ; Thu, 21 Apr 2005 16:05:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71174-09 for ; Thu, 21 Apr 2005 19:05:47 +0000 (GMT) Received: from metux.de (seven.metux.de [193.16.1.1]) by svr1.postgresql.org (Postfix) with ESMTP id 7D24453855 for ; Thu, 21 Apr 2005 16:05:44 -0300 (ADT) Received: (from weigelt@localhost) by metux.de (8.12.10/8.12.10) id j3LJ5iVA019912 for pgsql-performance@postgresql.org; Thu, 21 Apr 2005 21:05:44 +0200 Date: Thu, 21 Apr 2005 21:05:44 +0200 From: Enrico Weigelt To: postgresql performance list Subject: index not used Message-ID: <20050421190543.GA16548@nibiru.borg.metux.de> Reply-To: weigelt@metux.de Mail-Followup-To: postgresql performance list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/587 X-Sequence-Number: 11984 Hi folks, I'm doing a simple lookup in a small table by an unique id, and I'm wondering, why explains tells me seqscan is used instead the key. The table looks like: id bigint primary key, a varchar, b varchar, c varchar and I'm quering: select * from foo where id = 2; I've got only 15 records in this table, but I wanna have it as fast as possible since its used (as a map between IDs and names) for larger queries. thx -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact@metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- ---------------------------------------------------------------------