Connection pooling or not...

Results 1 to 2 of 2

Thread: Connection pooling or not...

  1. #1
    Davva Guest

    Default Connection pooling or not...

    Anyone have the facts about using connection reusage on the IIS4?<BR>A friend of mine claims that when creating several new recordsets, it&#039s no gain to first create one connection object that is reused with all the recordsets, since the IIS4 automatically uses connection pooling.<BR><BR>But when I tried this (defining the odbc source right in the statement), it seemed to slow down the code.<BR><BR>Comments anyone?

  2. #2
    Join Date
    Dec 1969

    Default RE: Connection pooling or not...

    There&#039s no reason to NOT create a connection object once at the beginning of the script, and destroy it at the end. Yes, IIS4 uses connection pooling, but you still have to expend the resources (memory and CPU time) to create & destroy that connection object multiple times if that&#039s what you do. Connection pooling only goes so far as keeping connections to the database; it doesn&#039t have anything to do with the connection objects as far as I know.<BR><BR>And if you want to get *really* picky, just remember that every line of code you write is a little CPU time that&#039s needed to process it. So if you are creating a new connection for each, that&#039s an extra line (or more) that has to get processed. So logically, it will take longer to run, even if your friend&#039s idea of connection pooling was how IIS works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts