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 64A0B9DCA13 for ; Mon, 23 Jan 2006 07:53:26 -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 24671-07 for ; Mon, 23 Jan 2006 07:53:28 -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 A29B09DC9BE for ; Mon, 23 Jan 2006 07:53:23 -0400 (AST) Received: FROM [217.112.177.158] BY mail.codata.be with hMailServer ; Mon, 23 Jan 2006 12:53:25 +0100 Message-ID: <43D4C3B3.7070509@freesurf.fr> Date: Mon, 23 Jan 2006 12:53:23 +0100 From: Arnaud Lesauvage Reply-To: thewild@free.fr User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Slow query through ODBC References: <43D4A744.8060104@freesurf.fr> <20060123103503.GA21460@soptik.pzkagis.cz> <43D4B6F9.10305@freesurf.fr> <20060123113239.GB21840@soptik.pzkagis.cz> In-Reply-To: <20060123113239.GB21840@soptik.pzkagis.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.465 required=5 tests=[AWL=-0.015, DNS_FROM_RFC_ABUSE=0.479, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.465 X-Spam-Level: X-Archive-Number: 200601/213 X-Sequence-Number: 7028 Ludek Finstrle a écrit : >> >Don't you have problem with geting whole data correctly? There >> >is bug in psqlodbc driver when reading data from text field larger >> >then 2048 (+-) bytes (in Unicode driver). The problem was fixed >> >in 08.01.0106 development snapshot. >> >> No, the data looks good. I am drawing the spatial objects with the >> query results, and my code would throw an error if some data was >> incorrect. > > Ok. I describe the problem better. The problem was that last part > of each row returned from psqlodbc are random data from memory. > So if the data for one column (and row) is larger then N bytes (some > users has problem with N = 2048 bytes) the problem raised. > It means that only last +- 1 .. N bytes for each row are filled > randomely from memory. > You didn't must run in the problem if the data are fetched in one call > of SQLGetData. I only want to notice it. It could help you in the > future ;-) Good point Ludek. I double checked my data, and it definitively good in the output. FYI, the largest field returned is 23581 characters long. The dataset is ~1.6MB long (so we have an average of 1kB per row). >> I will try with these parameters, but how do I add them to the >> connectionstring ? >> Should I just append something like ";usedeclarefecth=1" at the >> end of it ? I can't find any documentation on this (maybe I am not >> searching at the right place...). > > I'm sorry I don't know it exactly (I use ODBC manager). > Maybe you could configure it through ODBC manager ... > > I try to search it in source code and it could be (fullname and > shortcut): > ;UseDeclareFetch=1 > ;B6=1 > > ;UseServerSidePrepare=1 > ;C8=1 > > Maybe it's case insensitive. I don't know it exactly. > Don't use it both at the time. You only waste your time if you try it. I tried both parameters (they look OK because ADO did not throw an error), but they did not help. Maybe I should add that the query is stored in an ADO recordset, which is read-only and forward-only ? It is the .open method of this recordset that actually takes 30 seconds to run. > You could remove the data from log (only keep there a note that data > is fetched and the data length could be useful too). > You want to seatch CC_mapping and PGAPI_GetData in the log. > There is at least one line per row. Maybe it could be easier when > you replace your data with 'x' or something like that. > > If I can't find the problem in mylog output could you create example > data? I sure could ! I'll try some other parameters before (I will use the File-DSN panel to generate connectionstrings, I should have thought about it before !), and I'll tell you whether I found something or not. -- Arnaud