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 4D37753313 for ; Mon, 18 Apr 2005 10:31:54 -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 92808-07 for ; Mon, 18 Apr 2005 13:31:49 +0000 (GMT) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by svr1.postgresql.org (Postfix) with ESMTP id 40D4D52C7A for ; Mon, 18 Apr 2005 10:31:48 -0300 (ADT) Received: from jfradkin ([63.162.100.127]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IF500LUB9L2N3Y1@vms046.mailsrvcs.net> for pgsql-performance@postgresql.org; Mon, 18 Apr 2005 08:31:51 -0500 (CDT) Date: Mon, 18 Apr 2005 09:31:57 -0400 From: "Joel Fradkin" Subject: Re: speed of querry? In-reply-to: To: "'Dave Page'" , "'PostgreSQL Perform'" Message-id: <000801c5441a$fe9010e0$797ba8c0@jfradkin> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Outlook, Build 10.0.6626 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: quoted-printable Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal 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/395 X-Sequence-Number: 11792 pgAdmin III uses libpq, not the ODBC driver. Sorry I am not too aware of all the semantics. I guess the question is if it is normal to take 2 mins to get 160K of records, or is there something else I can do (I plan on limiting the = query screens using limit and offset; I realize this will only be effective = for the early part of the returned record set, but I believe they don't page through a bunch of records, they probably add search criteria). But for reporting I will need to return all the records and this seems slow to = me (but it might be in line with what I get now; I will have to do some benchmarking). The application is a mixture of .net and asp and will soon have java. So I am using the .net library for the .net pages and the ODBC driver = for the asp pages. I did find using a view for the location join sped up the query a great deal, I will have to see if there are other places I can use that = thinking (instead of joining on the associate table and its dependants I can just join on a view of that data, etc). Basically I have a view that does a join from location to district, = region and division tables. The old viwassoclist had those joined to the assoc table in the viwassoclist, I changed it to use the view I created where = the tables were joined to the location table and in assoclist I just join to = the location view. This really made a huge difference in speed. Regards, Dave