473,385 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

multiple db connections-your advice needed

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!
Jul 19 '05 #1
5 1537
"Joey Martin" <jo**@infosmiths.net> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
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/windowsserv...y/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
Jul 19 '05 #2
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!
Jul 19 '05 #3
"Joey Martin" <jo**@infosmiths.net> wrote in message
news:e5**************@TK2MSFTNGP10.phx.gbl...
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.
Jul 19 '05 #4
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" <jo**@infosmiths.net> a écrit dans le message de
news:e5**************@TK2MSFTNGP10.phx.gbl...
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!

Jul 19 '05 #5
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" <jo**@infosmiths.net> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
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!


Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gabriel Jiva | last post by:
I have a Python app, spam.py, that uses a C shared library, eggs.so. This shared library is an interface that makes connections to another system (Ham), and among other things uses callback...
6
by: Quiet Man | last post by:
Hi all, I'm designing a fairly simple service that will run on W2K/SP4 and W2K3 servers. It's job is to be a very specialized database server that listens on a given IP address / TCP port and...
1
by: Radu.Micu | last post by:
What is the best way to work with multiple db connections? I mean that I ahave an app with a TreeView on it and for each node(if he has some props)I want to use a diffrent db (MsAccess) connection,...
1
by: VITAS | last post by:
Hi Im trying to program a irc client and got stuck in trying to establish multiple server connections. The core problem is, that i dont know how many connections i will be using so i tried a array...
1
by: VITAS | last post by:
Hi Im trying to program a irc client and got stuck in trying to establish multiple server connections. The core problem is, that i dont know how many connections i will be using so i tried a array...
2
by: jasonsgeiger | last post by:
From: "Factor" <jasonsgeiger@gmail.com> Newsgroups: microsoft.public.in.csharp Subject: Multiple Clients, One port Date: Wed, 19 Apr 2006 09:36:02 -0700 I'm been working with sockets for a...
3
by: D. Yates | last post by:
Hi, I'm about to embark on a project that will both send and receive information to/from our client computers in the field. The area that I still need to finalize is the method of...
4
by: sracherla | last post by:
I am trying to write a simple windows service that accepts an incoming request; receives a string input and sends a string output. I need this connection to stay alive until the client closes it....
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
5
by: Chamnap | last post by:
Hello, I want to implement multiple uploads with multiple iframe posting to the server at the same time. Do all of you think it is possible to do this? Does this ways has any drawbacks? Give me...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.