X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 17A79D7AEF for ; Thu, 25 Aug 2005 00:56:14 -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 10886-03 for ; Thu, 25 Aug 2005 03:56:11 +0000 (GMT) Received: from exch01smtp09.hdi.tvcabo (smtp2.netcabo.pt [212.113.174.29]) by svr1.postgresql.org (Postfix) with ESMTP id 986B4D7330 for ; Thu, 25 Aug 2005 00:56:10 -0300 (ADT) Received: from www.calmetric.pt ([213.22.54.4]) by exch01smtp09.hdi.tvcabo with Microsoft SMTPSVC(6.0.3790.211); Thu, 25 Aug 2005 04:56:06 +0100 Received: from plexus ([192.168.1.1]) (authenticated bits=0) by www.calmetric.pt (8.12.8/8.12.8) with ESMTP id j7P3ovmg010243 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 25 Aug 2005 04:50:58 +0100 Reply-To: From: "Silvio Macedo" To: Subject: LabView and PostgreSQL ; and RecordSet GetString performance Date: Thu, 25 Aug 2005 04:59:40 +0100 Organization: Calmetric Lda Message-ID: <000401c5a929$6c0cf930$0302a8c0@plexus> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-OriginalArrivalTime: 25 Aug 2005 03:56:06.0536 (UTC) FILETIME=[EB895880:01C5A928] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/46 X-Sequence-Number: 5717 Hi, A week or two ago, Fisher Ulrich asked this list about interfaces from LabView to PostgreSQL. (hope he's reading as I couldn't find his original email in the list archive). For LabView on Windows, you can use LabSQL, which is a simple, but convenient, ADO wrapper to Postgres. You then can use native OLEDB (undergoing development) or PostgreSQL OLE/ODBC driver. LabSQL - google search it OLEDB and ODBC come with standard dist (windows, of course) To save you time, DSN-less connection strings are as follows: For ODBC: DRIVER=3D{PostgreSQL};SERVER=3D127.0.0.1;port=3D5432;DATABASE=3DIT2CalMet= er200 5;UID=3DIT2CalMeter;PWD=3Dxxxxx; For OLEDB: Provider=3DPostgreSQL; Location=3DIT2CalMeter2005; User = ID=3DIT2CalMeter; Password=3Dxxxxx; change db, user and pass as needed, obviously. Now, I'm having two issues with these: - in native OLEDB, if an error happens when executing an SQL statement, I cannot close the connection (ADO Connection.Close won't actually close it) and the backend will start to have lots of zombie connections (well, Idle at least). - on the other hand, in OLE/ODBC, RecordSet.GetString is about 10 times slower than native OLEDB to get 20K records (tstamp,value).=20 Anybody had this sort of performance hit on GetString on PostgreSQL ODBC? Any tips? Any special connection string tuning? Would GetRows be much better? Thanks a lot Silvio