Re: Queries run twice
От | Joost Kraaijeveld |
---|---|
Тема | Re: Queries run twice |
Дата | |
Msg-id | A3D1526C98B7C1409A687E0943EAC410605F24@obelix.askesis.nl обсуждение исходный текст |
Ответ на | Queries run twice ("erne_dev @ Bellsouth.net" <erne_dev@bellsouth.net>) |
Список | pgsql-odbc |
pgsql-odbc-owner@postgresql.org schreef: > Running version 8.0 server under WinXP, client is Builder/ADO > application connecting through ODBC. Found a reference to exactly the > same problem on > this msg > http://archives.postgresql.org/pgsql-odbc/2005-02/msg00033.php. Is > this a PostgreSQL bug? Or is it ODBC driver? My application > also works with > MySQL and this doesn't happen when connecting to a MySQL > server so I don't > think is has to do with the ADO components. Like the poster > of that message > my query gets executed twice, one as I specified the second > time without the > WHERE clause, so the whole Table is returned causing a lot of network > traffic and slowing things down...What is the 'parse > statement' mentioned on > that message? Is that a PostgreSQL setting? As Richard pointed out, this is done if the odbcdriver cannot determine the execat types of the returned columns. This shouldbe mainly a problem for queries that call a stored procedure as in most circumstances the drivers is capable of gettingthe types by other means (see the file parse.c in the source distribution). You could try to turn on the "Use Declare/Fetch": that does not prohibit the query being run twice, but it will leave thedata on the server untill requested. Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 e-mail: J.Kraaijeveld@Askesis.nl web: www.askesis.nl
В списке pgsql-odbc по дате отправления: