X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E9603D1B4E1 for ; Fri, 26 Sep 2003 14:35:43 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 27455-05 for ; Fri, 26 Sep 2003 11:35:36 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 8DC0DD1B4FF for ; Fri, 26 Sep 2003 11:35:32 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h8QEZa6c015415; Fri, 26 Sep 2003 10:35:36 -0400 (EDT) To: rantunes@student.dei.uc.pt Cc: pgsql-performance@postgresql.org Subject: Re: Indices arent being used In-reply-to: <200309261057.h8QAvSXA009541@student.dei.uc.pt> References: <200309261057.h8QAvSXA009541@student.dei.uc.pt> Comments: In-reply-to rantunes@student.dei.uc.pt message dated "Fri, 26 Sep 2003 10:57:28 +0000" Date: Fri, 26 Sep 2003 10:35:36 -0400 Message-ID: <15414.1064586936@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/331 X-Sequence-Number: 3697 rantunes@student.dei.uc.pt writes: > sort_mem = 2048 2 meg sort_mem seems on the small side. > Yes I have an index on actvars.product_level and an index on > prodlevel.code_level.Both indices have character(12) data types. Can you force an indexscan to be chosen by setting enable_seqscan off? If so, what does the explain look like? BTW, it's always much more useful to show EXPLAIN ANALYZE output than plain EXPLAIN. The issue is generally "why did the planner misestimate" and so knowing how its estimates diverge from reality is always a critical bit of information. regards, tom lane