X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 9E79D9DC806 for ; Mon, 23 Jan 2006 05:46:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06284-02 for ; Mon, 23 Jan 2006 05:46:29 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 82DE19DC813 for ; Mon, 23 Jan 2006 05:46:26 -0400 (AST) Received: from mail.codata.be (217.64.244.119.mactelecom.net [217.64.244.119]) by svr4.postgresql.org (Postfix) with SMTP id CC0965AF0AC for ; Mon, 23 Jan 2006 09:46:28 +0000 (GMT) Received: FROM [217.112.177.158] BY mail.codata.be with hMailServer ; Mon, 23 Jan 2006 10:46:25 +0100 Message-ID: <43D4A5F0.8060705@free.fr> Date: Mon, 23 Jan 2006 10:46:24 +0100 From: Arnaud Lesauvage User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Slow query through ODBC Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.161 required=5 tests=[AWL=0.160, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.161 X-Spam-Level: X-Archive-Number: 200601/303 X-Sequence-Number: 7118 Hi all ! I have a query that runs very fast when executed through pgAdmin (~2 seconds), but very slowly through the ODBC driver (~30 seconds). Both queries are executed from the same workstation on the same server. My workstation is a WinXP Pro, and I use the latest psqlODBC driver available as an MSI package (version 8.01.0102). The server is a PostGreSQL 8.1.2, running on a Win2000 server. The query is very simple, it returns about 1500 lines, made of only one text field, but this field can be very large (it is the WKT representation of a spatial object from PostGIS). I am connecting to the server in a VBA project with a simple connectionstring with only default options (I have not found a document explaining how to fine tune the odbc driver). My connectionstring is : "DRIVER={PostgreSQL Unicode};SERVER=myserver;PORT=5432;DATABASE=mydatabase;UID=myuser;PWD=mypass" I assume that the problem is with the very large field size that is returned, but what should I change in my connectionstring to make this query run faster ? Thanks for your help ! -- Arnaud