Обсуждение: 1-2 second delay on all commands over network
I am coding a small Visual Basic app using ODBC and ADO to connect to a Postgres 7.3 database running on a RedHat 9 server. The issue I am having is a small delay of 1-2 seconds for every command I issue in the application. 2 seconds to connect then 2 seconds to query...about 2 seconds with every command. The app has a few simple queries when it starts but takes a solid 10 seconds to first open because of these delays. The server is already being using as a web server and the speeds on the queries that PHP makes is great. Any suggestions would be greatly appreciated.
On Sat, 2003-11-01 at 09:06, Matthew Cimino wrote:
> I am coding a small Visual Basic app using ODBC and ADO to connect to
> a Postgres 7.3 database running on a RedHat 9 server. The issue I am
> having is a small delay of 1-2 seconds for every command I issue in
> the application. 2 seconds to connect then 2 seconds to query...about
> 2 seconds with every command. The app has a few simple queries when it
> starts but takes a solid 10 seconds to first open because of these
> delays.
>
> The server is already being using as a web server and the speeds on
> the queries that PHP makes is great.
>
> Any suggestions would be greatly appreciated.
What does pg_hba.conf look like? It is possible that it is trying to do
an ident lookup, failing that, and falling back to password or
something.
Cheers,
Andrew.
-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267
The secret of being a bore is to say everything - Voltaire
-------------------------------------------------------------------------
The applicable line in the pg_hba.conf file is host <<database_name>>, <<database2_name>> <<username>> 192.168.0.0 255.255.0.0 password The connection is made via the PostgreSQL ODBC driver from on Win2k machine with a Linux account username and password. The connection command from Visual Basic is dbSG.Open "DSN=postgreSQL;UID=<<username>>;PWD=<<password>>;Database=<<database_name>>"
It turns out ODBC was doing some traces on my queries. I uninstalled and reinstalled the Postgres driver and turned off tracing.