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 EF7179DC888 for ; Fri, 10 Feb 2006 07:23:53 -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 54881-09 for ; Fri, 10 Feb 2006 07:23:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.codata.be (217.64.244.119.mactelecom.net [217.64.244.119]) by postgresql.org (Postfix) with SMTP id 6BAD79DC81A for ; Fri, 10 Feb 2006 07:23:51 -0400 (AST) Received: FROM [217.112.178.162] BY mail.codata.be with hMailServer ; Fri, 10 Feb 2006 12:23:53 +0100 Message-ID: <43EC77C8.5090403@freesurf.fr> Date: Fri, 10 Feb 2006 12:23:52 +0100 From: Arnaud Lesauvage User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Magnus Hagander CC: pgsql-odbc@postgresql.org, Dave Page , Ludek Finstrle Subject: Re: Slow query through ODBC References: <6BCB9D8A16AC4241919521715F4D8BCE6C7FDA@algol.sollentuna.se> In-Reply-To: <6BCB9D8A16AC4241919521715F4D8BCE6C7FDA@algol.sollentuna.se> 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.472 required=5 tests=[AWL=-0.008, DNS_FROM_RFC_ABUSE=0.479, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.472 X-Spam-Level: X-Archive-Number: 200602/53 X-Sequence-Number: 7182 >> I have splitted the data into 4 fields. >> The largest field was ~23.000 characters long, so I made 4 >> fields containing. The first one contains the first 6000, the >> second one from 6001 to 12000, etc... >> The query took about half the time to run ! > > Interesting. Did it make any difference to the timings in psql and/or pgadmin? No, not at all. Actually, it even runs a tiny bit slower in pgAdmin (2.05 sec vs 1.95 for the "one large field" version). >> Yes, I really don't understand either ! >> But even though all use libpq.dll, they might not handle the >> data the same way. Mayboe ODBC needs to check for data type, >> field length, etc... and the other frontends do not need this >> kind of information ? > > Hm. That's an interesting observation. When you do a query with ODBC, does it do any "extra queries" automatically on the system tables? Enable statement logging on the server and see if something weird shows up. No, no query on the system tables. I am not very familiar with the log though, maybe Ludek could tell us more about that ? Regards -- Arnaud