X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AA2FE8B9B2A for ; Tue, 1 Feb 2005 17:25:58 +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 95401-03 for ; Tue, 1 Feb 2005 17:25:44 +0000 (GMT) Received: from presinet-main.presinet.com (mail.presinet.com [209.53.156.1]) by svr1.postgresql.org (Postfix) with ESMTP id 907388B9B9A for ; Tue, 1 Feb 2005 17:25:43 +0000 (GMT) Received: from [10.10.1.151] (BRICK [10.10.1.151]) by presinet-main.presinet.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2658.3) id CZZVSBL9; Tue, 1 Feb 2005 09:24:15 -0800 Message-ID: <41FFBB95.3090306@PresiNET.com> Date: Tue, 01 Feb 2005 09:25:41 -0800 From: Bricklen Anderson User-Agent: Debian Thunderbird 1.0 (X11/20050116) X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: Joel Fradkin , pgsql-sql@postgresql.org Subject: Re: MSSQL versus Postgres timing References: <000001c5087e$b92ddfa0$797ba8c0@jfradkin> <20050201170654.GA65518@winnie.fuhr.org> In-Reply-To: <20050201170654.GA65518@winnie.fuhr.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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: 200502/28 X-Sequence-Number: 20139 Michael Fuhr wrote: > On Tue, Feb 01, 2005 at 11:54:11AM -0500, Joel Fradkin wrote: > >>A table with 645,000 records for associates has view (basically select * >>from tblassociates where clientnum = 'test') >> >>This is taking 13 seconds in postgres and 3 seconds in MSSQL. > > > Please post the EXPLAIN ANALYZE output for the slow query, once > with enable_seqscan on and once with it off. For example: > > SET enable_seqscan TO on; -- if not already on > EXPLAIN ANALYZE SELECT * FROM tblassociates WHERE clientnum = 'test'; > > SET enable_seqscan TO off; > EXPLAIN ANALYZE SELECT * FROM tblassociates WHERE clientnum = 'test'; > > >>Be glad to provide the view and tables etc. > > > Please do -- it might help us spot something that could be improved. > What version of PostgreSQL are you using? > Also, is clientnum a string datatype, or are you doing implicit type conversion?