Connection pool

BubikolRamios's profile image BubikolRamios posted 9 years ago in Feature discussion Permalink

I doubt that is build in, so I suggest implementation of that. That would enable execution of multple query tabs at same time without hanging entire app.

BubikolRamios's profile image BubikolRamios posted 9 years ago Permalink

forinstance, I executed "query" tab - call to stored proc which takes a while, changed focus to query2 , click execute, nothing happened, hanging, waiting to "query" to finish. When that is ower, cant run query2 coz run button is hanged at disabled state.

ansgar's profile image ansgar posted 9 years ago Permalink

You cannot run two queries on the same server using the same connection. Well, you can try, but you would get some "Commands out of sync, you cannot run this command now", followed by a disconnect. That's why HeidiSQL blocks firing more than one query simultaneously.

BubikolRamios's profile image BubikolRamios posted 9 years ago Permalink

Hence the app should have opened 0 (1 at least in heidi sql coz you need to have something for db structure display) or more connections to sql server at same time , as much connections as needed.

I have that in java, general logic: An objec holding existing connections, connection falls out of this when it expires on server or after time set at connection creation. 2.create query, pull randome FREE connection out of object under1(if none free, create new & pull it out), mark it as busy, execute query,when done, mark connection inside object under 1 as free.

read forinstance this:

BubikolRamios's profile image BubikolRamios posted 9 years ago Permalink

BubikolRamios's profile image BubikolRamios posted 9 years ago Permalink

cant paste that into link.

http://forum.lazarus.freepascal.org/index.php?topic=15946.0
ansgar's profile image ansgar posted 9 years ago Permalink

I'm heavily against using more than one connection per session. That would mean the user cannot rely on previously modified session variables, and in general this is not *a session" any longer. No way.

BubikolRamios's profile image BubikolRamios posted 9 years ago Permalink

That might be so, but I consider more annoying running query, finding out it is running for reason of bad indexes or anything else, not be able to stop it anymore --> hanging prog. with stop button, and things like this.

Mybe you could limit pool to query windows only ?

Note for post no 2, trying to close query window, since it is useless anyway (query is not running for sure): / Cannot close tab with running query. Please wait until query has finished. /

Please login to leave a reply, or register at first.