Build connection on every page?

Discussion in 'ASP .Net' started by Stijn Verrept, Jan 20, 2004.

  1. When I do a Response.Redirect to load another page do I need to connect
    to the database again if I need information? If so, isn't this a bad
    for performance?


    --
    Kind regards,

    Stijn Verrept.
    Stijn Verrept, Jan 20, 2004
    #1
    1. Advertising

  2. Stijn Verrept

    Hermit Dave Guest

    depends on the application and the amount of data you fetch with each call.
    by default a pool of 100 objects is maintained.. ie if you create a
    connection and then called dispose.. its returned to connection pool...
    if then you do another request and if that object is not being used... it
    will be served to you.. otherwise a new object is created...
    if you are fetching large amounts of data with each call.. and you
    frequently call same set of db calls... then it might be a better idea to
    use
    a: cache is the data is common but frequently used between users
    b: session if the data is unique but frequently used (if you state piling up
    data in session it may cause application restart to reduce memory usage)
    at the end of it... you do have to do a comparitive performance in terms of
    memory usuage and making the db call..

    hope this helps..

    --
    Regards,
    HD
    Once a Geek.... Always a Geek
    "Stijn Verrept" <stijn@no_s.p.a.n.entrysoft.com> wrote in message
    news:400c7d8f$0$295$...
    > When I do a Response.Redirect to load another page do I need to connect
    > to the database again if I need information? If so, isn't this a bad
    > for performance?
    >
    >
    > --
    > Kind regards,
    >
    > Stijn Verrept.
    Hermit Dave, Jan 20, 2004
    #2
    1. Advertising

  3. Hermit Dave wrote:

    > a: cache is the data is common but frequently used between users
    > b: session if the data is unique but frequently used (if you state
    > piling up data in session it may cause application restart to reduce
    > memory usage) at the end of it... you do have to do a comparitive
    > performance in terms of memory usuage and making the db call..
    >
    > hope this helps..


    Thanks, this sure helps. I searched MS for pooling and found a good
    article about it as well.

    --
    Kind regards,

    Stijn Verrept.
    Stijn Verrept, Jan 20, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Doran
    Replies:
    2
    Views:
    607
    James Doran
    Jun 15, 2004
  2. David Lozzi

    Build with every change to the code?!?!?

    David Lozzi, Dec 16, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    446
    Peter Rilling
    Dec 16, 2004
  3. Replies:
    5
    Views:
    759
    Chris Uppal
    Jun 25, 2006
  4. Leon
    Replies:
    0
    Views:
    346
  5. =?Utf-8?B?SXJ3YW5zeWFo?=
    Replies:
    4
    Views:
    2,452
    =?Utf-8?B?SXJ3YW5zeWFo?=
    Oct 30, 2007
Loading...

Share This Page