multiple db connections-your advice needed

Discussion in 'ASP General' started by Joey Martin, Aug 11, 2004.

  1. Joey Martin

    Joey Martin Guest

    On my website, I want to provide 3 pieces of statistics that will
    require 3 queries to my SQL database. As much as I'd like these to be
    live, they are part of a footer that will load each time for about 10
    pages on my site. I am thinking that, although they are simple queries,
    it may be just too much.

    What do you recommend?
    I could open the connection, run the query and then close it, each time.
    Would this be a recommend plan?

    Or, should I create a daily task that builds a simple text file with
    those query results and just pull those in each time the footer is
    loaded? This would not be live, but I can deal with it.

    What do you all think?



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Joey Martin, Aug 11, 2004
    #1
    1. Advertising

  2. "Joey Martin" <> wrote in message
    news:...
    > On my website, I want to provide 3 pieces of statistics that will
    > require 3 queries to my SQL database. As much as I'd like these to be
    > live, they are part of a footer that will load each time for about 10
    > pages on my site. I am thinking that, although they are simple queries,
    > it may be just too much.
    >
    > What do you recommend?
    > I could open the connection, run the query and then close it, each time.
    > Would this be a recommend plan?
    >
    > Or, should I create a daily task that builds a simple text file with
    > those query results and just pull those in each time the footer is
    > loaded? This would not be live, but I can deal with it.
    >
    > What do you all think?


    Why not test option #1, and if it doesn't work, go with #2?

    --
    Tom Kaminski IIS MVP
    http://www.microsoft.com/windowsserver2003/community/centers/iis/
    http://mvp.support.microsoft.com/
    http://www.iisfaq.com/
    http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
    http://www.tryiis.com
    Tom Kaminski [MVP], Aug 11, 2004
    #2
    1. Advertising

  3. Joey Martin

    Joey Martin Guest

    It's not whether it will work or not, because I know it will. But from a
    performance/bandwidth perspective, I am curious which is better.




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Joey Martin, Aug 11, 2004
    #3
  4. "Joey Martin" <> wrote in message
    news:...
    > It's not whether it will work or not, because I know it will. But from a
    > performance/bandwidth perspective, I am curious which is better.


    That's what you need to test in your specific environment.
    Tom Kaminski [MVP], Aug 11, 2004
    #4
  5. Joey Martin

    Patrice Guest

    In this particular case :
    - if not too costly (no need to cache) you'll have the benefit of live
    statistics
    - if too costly and cached you can live with it

    Now as said Tom, you are the only one that can define if it is actually too
    costly or not... Note that if properly wrapped into a "function", the app
    itself won't need to know wether or not it is cached and you'll be able to
    easily cache or not these data by updating a unique function...

    Patrice

    --

    "Joey Martin" <> a écrit dans le message de
    news:...
    > It's not whether it will work or not, because I know it will. But from a
    > performance/bandwidth perspective, I am curious which is better.
    >
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Patrice, Aug 11, 2004
    #5
  6. Joey Martin

    Mark Schupp Guest

    How often does the data change?
    Is it different for different users?

    If it is the same for all users you could keep it in application variables
    and do periodic updates.

    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    "Joey Martin" <> wrote in message
    news:...
    > On my website, I want to provide 3 pieces of statistics that will
    > require 3 queries to my SQL database. As much as I'd like these to be
    > live, they are part of a footer that will load each time for about 10
    > pages on my site. I am thinking that, although they are simple queries,
    > it may be just too much.
    >
    > What do you recommend?
    > I could open the connection, run the query and then close it, each time.
    > Would this be a recommend plan?
    >
    > Or, should I create a daily task that builds a simple text file with
    > those query results and just pull those in each time the footer is
    > loaded? This would not be live, but I can deal with it.
    >
    > What do you all think?
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Mark Schupp, Aug 11, 2004
    #6
    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. Asun Friere
    Replies:
    1
    Views:
    500
    Paul Boddie
    Aug 27, 2003
  2. Peter Hansen
    Replies:
    23
    Views:
    872
    Anton Vredegoor
    Sep 5, 2003
  3. Gerrit Holl
    Replies:
    16
    Views:
    620
    Tom Plunket
    Aug 29, 2003
  4. Asun Friere
    Replies:
    0
    Views:
    479
    Asun Friere
    Aug 28, 2003
  5. jobs
    Replies:
    2
    Views:
    891
Loading...

Share This Page