Re: Possible to use one connection for multiple concurrent queries?
Posted by:
Apachez
Date: March 03, 2006 06:14AM
I think you have misunderstood what persistent connections are.
The thing with persistent connections is that they doesnt disconnect from the server making the startup time (where you disconnect and for the next webserveraccess reconnect) set to a minimum since there are usually a high cost of connecting and disconnecting.
To my knowledge persistent connections will not allow concurrent queries and that is bascially my question if there still is a way to run concurrent queries which has nothing to do with each other through a single connection ?
Usually the flow is:
* connect
* query1
* get result from query1
* query2
* get result from query2
* query3
* get result from query 3
* disconnect
this way if the single query takes 10 seconds to complete the total processing time will be 3x10=30 seconds.
What I would like to have is more:
* connect
* query1, query2, query3
* sit and wait until all has completed
* disconnect
this way the total time would be something like 10-11 seconds (or at least way smaller than 30 seconds).
But what I have found so far (which is why I ask in here) is that I am forced to have one connection per concurrent query meaning:
* connect1, connect2, connect3
* query1 through connect1, query2 through connect2, query3 through connect3
* sit and wait
* disconnect1, disconnect2, disconnect3
The bad thing with the later is that it will consume as many connections as there are "subqueries". Meaning if someone searches for 10 words at the same time they will use at least 10 connections while the search is in progress and say with 100 users that would be 1000 connections instead of 100 connections unless there is a way to run concurrent queries through a single connection.
Subject
Written By
Posted
February 28, 2006 08:37PM
Re: Possible to use one connection for multiple concurrent queries?
March 03, 2006 06:14AM
November 09, 2006 11:25AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.