X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 37B31D1B548; Sun, 26 Oct 2003 14:40:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 36900-09; Sun, 26 Oct 2003 10:40:24 -0400 (AST) Received: from fuji.krosing.net (silmet.estpak.ee [194.126.97.78]) by svr1.postgresql.org (Postfix) with ESMTP id 64135D1B554; Sun, 26 Oct 2003 10:40:19 -0400 (AST) Received: from fuji.krosing.net (localhost.localdomain [127.0.0.1]) by fuji.krosing.net (8.12.8/8.12.8) with ESMTP id h9QEcG5r002703; Sun, 26 Oct 2003 16:38:17 +0200 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id h9QEcGEp002701; Sun, 26 Oct 2003 16:38:16 +0200 X-Authentication-Warning: fuji.krosing.net: hannu set sender to hannu@tm.ee using -f Subject: Re: [PERFORM] Slow performance with no apparent reason From: Hannu Krosing To: Yonatan Goraly Cc: pgsql-general@postgresql.org, pgsql-performance@postgresql.org In-Reply-To: <3F9AEA51.2070701@sbcglobal.net> References: <3F9AEA51.2070701@sbcglobal.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1067179095.2604.3.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sun, 26 Oct 2003 16:38:16 +0200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/1247 X-Sequence-Number: 51320 Yonatan Goraly kirjutas P, 26.10.2003 kell 00:25: > I am in the process of adding PostgreSQL support for an application, > in addition to Oracle and MS SQL. > I am using PostgreSQL version 7.3.2, Red Hat 9.0 on Intel Pentium III > board. > > I have a query that generally looks like this: > > SELECT t1.col1, t2.col1 FROM t1, t2 WHERE t1.x=t2.y AND t2.p='string' > AND t2.q=1 > > This query is strikingly slow (about 100 sec when both t1 and t2 has > about 1,200 records, compare with less than 4 sec with MS SQL and > Oracle) always send results of EXPLAIN ANALYZE if you ask for help on [PERFORM] knowing which indexes you have would also help. and you should have run ANALYZE too. ----------------- Hannu