Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Fastest way to check aliveness of connection



Hello Oliver,

Oliver Jowett schrieb:
Running an empty query ("") is probably the simplest way.

In theory you could do something slightly faster at the protocol level (just send Sync and wait for ReadyForQuery) but there's no interface currently exposed to do that and I doubt that it will be much faster than an empty query anyway.
Yes, I investigated that, but since the normal query procedure also just sends one package, the gain for just sending the sync does not really matter. Of course, your idea with the empty query is great. Thanks alot.

With best regards,
Daniel Migowski




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group