RE: database connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




--- "Kilbride, James P." <James.Kilbride@xxxxxxxxxx>
wrote:

> While that kind of query structure can be a huge
> issue the biggest
> problem, and performance penalty, occurs if the
> programmer is opening
> and closing actual real connections. A good
> structure would use a
> singleton connection that is opened only the first
> time it is called and
> the rest of the time returns the connection object
> already opened. Or,
> use pooling or similar types of things. You will get
> orders of magnitude
> increase in speed by not reopening the database
> multiple times per page
> especially if you are seeing 15,20 or especially
> hundreds of
> connections. Sometimes though you have no real
> choice but to build a
> system that has to generate multiple queries, so
> don't judge the page
> simply on the number of queries but on the
> completity of the reporting
> and the number of database connections opened(you
> will occasionally need
> more than one if you arn't pulling all the results
> at once, using
> cursors or partial retrievals instead and have to
> have multiple result
> sets open at any given time).
> 
> James Kilbride 

Hey James,
Thanks for replying.

Sorry, I guess i was not clear on that.

Its just one connection, I meant 15-20 queries not
connections.

Thanks!
Ryan

------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux