X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9172E3A3E19 for ; Sat, 6 Nov 2004 21:58:01 +0000 (GMT) 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 80668-09 for ; Sat, 6 Nov 2004 21:57:54 +0000 (GMT) Received: from mpls-qmqp-02.inet.qwest.net (mpls-qmqp-02.inet.qwest.net [63.231.195.113]) by svr1.postgresql.org (Postfix) with SMTP id 2DEDB3A3EC8 for ; Sat, 6 Nov 2004 21:57:53 +0000 (GMT) Received: (qmail 88295 invoked by uid 0); 6 Nov 2004 20:35:22 -0000 Received: from mpls-pop-10.inet.qwest.net (63.231.195.10) by mpls-qmqp-02.inet.qwest.net with QMQP; 6 Nov 2004 20:35:22 -0000 Received: from 63-227-127-37.dnvr.qwest.net (HELO ?10.0.0.2?) (63.227.127.37) by mpls-pop-10.inet.qwest.net with SMTP; 6 Nov 2004 21:57:52 -0000 Date: Sat, 06 Nov 2004 16:00:15 -0700 Message-Id: <1099782015.1310.39.camel@localhost.localdomain> From: "Scott Marlowe" To: "Carlos Lopez" Cc: pgsql-performance@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [PERFORM] poor performance in migrated database In-Reply-To: <20041106195215.91282.qmail@web52706.mail.yahoo.com> References: <20041106195215.91282.qmail@web52706.mail.yahoo.com> Content-Type: text/plain Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/51 X-Sequence-Number: 15436 On Sat, 2004-11-06 at 12:52, Carlos Lopez wrote: > I have migrated a database from MS SQL to a > postgresSQL database, but when running it, the results > are very slow (and unusable) which is the only reason > we don't entirely move to postgresSQL. > The problem is that there are many nested views which > normally join tables by using two fields, one > character and other integer. If you are joining on different type fields, you might find the query planner encouraged to use the indexes if you cast one field to the other field's type. If that's possible.