|
 |
asp_databases thread: connection to more than one database within a site
Message #1 by <odempsey@b...> on Wed, 21 Aug 2002 00:25:53 +0100
|
|
Hi
are there performance issues in having a connection to more than one database within a site? The reason why I ask is that we need
to have 1 database (4MBs) on each of 30 sites in which there will be 6 common tables. However, there will also be 3 tables on each
of these sites which will have data unique to each of these sites.
I was thinking that the most efficient way to update the common tables is to upload a database containing these 6 tables to one site
on the Internet server and then to ftp the database across to the other 29 sites through the large bandwidth connection available
within the server provider's network. We could then upload a seperate database to each of the sites containing the unique tables
for those sites.
So to reiterate my question, are there performance issues involved with having a connection to more than one database within a site?
Or are there other ways to solve this problem?
Kind Regards
Oliver Dempsey
Message #2 by "Jack Dunstan" <jdunstan7@h...> on Tue, 20 Aug 2002 21:25:48 -0400
|
|
Oliver,
Just a thought - are the 3 tables that are unique, unique in structure or
data only. If its data only, could you add an additional field to each
table, like siteId, including it as part of the primary key, which then
would allow you to include the 3 tables as part of the main database. As
far as performance I don't have statistical data to provide, but limiting
the number of "open" connections to one database or multiple databases is
going to limit the network traffic.
My $ .02
Jack
----- Original Message -----
From: <odempsey@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, August 20, 2002 7:25 PM
Subject: [asp_databases] connection to more than one database within a site
> Hi
> are there performance issues in having a connection to more than one
database within a site? The reason why I ask is that we need to have 1
database (4MBs) on each of 30 sites in which there will be 6 common tables.
However, there will also be 3 tables on each of these sites which will have
data unique to each of these sites.
>
> I was thinking that the most efficient way to update the common tables is
to upload a database containing these 6 tables to one site on the Internet
server and then to ftp the database across to the other 29 sites through the
large bandwidth connection available within the server provider's network.
We could then upload a seperate database to each of the sites containing the
unique tables for those sites.
>
> So to reiterate my question, are there performance issues involved with
having a connection to more than one database within a site? Or are there
other ways to solve this problem?
>
>
> Kind Regards
> Oliver Dempsey
>
>
>
>
Message #3 by <odempsey@b...> on Wed, 21 Aug 2002 06:48:22 +0100
|
|
Hi Jack
thanks for your reply. I don't see how this would make updating of the 6 tables any more efficient
Kind Regards
Oliver Dempsey
00353 (0)502 26263
00353 (0)86 8219430
----- Original Message -----
From: "Jack Dunstan" <jdunstan7@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, August 21, 2002 2:25 AM
Subject: [asp_databases] Re: connection to more than one database within a site
> Oliver,
>
> Just a thought - are the 3 tables that are unique, unique in structure or
> data only. If its data only, could you add an additional field to each
> table, like siteId, including it as part of the primary key, which then
> would allow you to include the 3 tables as part of the main database. As
> far as performance I don't have statistical data to provide, but limiting
> the number of "open" connections to one database or multiple databases is
> going to limit the network traffic.
>
> My $ .02
> Jack
>
> ----- Original Message -----
> From: <odempsey@b...>
> To: "ASP Databases" <asp_databases@p...>
> Sent: Tuesday, August 20, 2002 7:25 PM
> Subject: [asp_databases] connection to more than one database within a site
>
>
> > Hi
> > are there performance issues in having a connection to more than one
> database within a site? The reason why I ask is that we need to have 1
> database (4MBs) on each of 30 sites in which there will be 6 common tables.
> However, there will also be 3 tables on each of these sites which will have
> data unique to each of these sites.
> >
> > I was thinking that the most efficient way to update the common tables is
> to upload a database containing these 6 tables to one site on the Internet
> server and then to ftp the database across to the other 29 sites through the
> large bandwidth connection available within the server provider's network.
> We could then upload a seperate database to each of the sites containing the
> unique tables for those sites.
> >
> > So to reiterate my question, are there performance issues involved with
> having a connection to more than one database within a site? Or are there
> other ways to solve this problem?
> >
> >
> > Kind Regards
> > Oliver Dempsey
> >
> >
> >
> >
>
>
Message #4 by "Giovanni Salucci" <g.salucci@n...> on Wed, 21 Aug 2002 07:58:22 +0200
|
|
what db use?
all the website are on the same server?
-----Messaggio originale-----
Da: odempsey@b... [mailto:odempsey@b...]
Inviato: mercoledì 21 agosto 2002 1.26
A: ASP Databases
Oggetto: [asp_databases] connection to more than one database within a
site
Hi
are there performance issues in having a connection to more than one
database within a site? The reason why I ask is that we need to have 1
database (4MBs) on each of 30 sites in which there will be 6 common tables.
However, there will also be 3 tables on each of these sites which will have
data unique to each of these sites.
I was thinking that the most efficient way to update the common tables is to
upload a database containing these 6 tables to one site on the Internet
server and then to ftp the database across to the other 29 sites through the
large bandwidth connection available within the server provider's network.
We could then upload a seperate database to each of the sites containing the
unique tables for those sites.
So to reiterate my question, are there performance issues involved with
having a connection to more than one database within a site? Or are there
other ways to solve this problem?
Kind Regards
Oliver Dempsey
Message #5 by "Jack Dunstan" <jdunstan7@h...> on Wed, 21 Aug 2002 11:26:24 -0400
|
|
Oliver,
You wrote - "We could then upload a seperate database to each of the sites
containing the unique tables for those sites." So I was assuming you were
talking about have 2 seperate databases, and thus needing to have 2
connections to the databases, 1 for the 6 common tables and 1 for the 3 site
unique tables. If you had everything in one database you would only need 1
connection.
Jack
----- Original Message -----
From: <odempsey@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, August 21, 2002 1:48 AM
Subject: [asp_databases] Re: connection to more than one database within a
site
> Hi Jack
> thanks for your reply. I don't see how this would make updating of the 6
tables any more efficient
>
>
> Kind Regards
> Oliver Dempsey
> 00353 (0)502 26263
> 00353 (0)86 8219430
>
> ----- Original Message -----
> From: "Jack Dunstan" <jdunstan7@h...>
> To: "ASP Databases" <asp_databases@p...>
> Sent: Wednesday, August 21, 2002 2:25 AM
> Subject: [asp_databases] Re: connection to more than one database within a
site
>
>
> > Oliver,
> >
> > Just a thought - are the 3 tables that are unique, unique in structure
or
> > data only. If its data only, could you add an additional field to each
> > table, like siteId, including it as part of the primary key, which then
> > would allow you to include the 3 tables as part of the main database.
As
> > far as performance I don't have statistical data to provide, but
limiting
> > the number of "open" connections to one database or multiple databases
is
> > going to limit the network traffic.
> >
> > My $ .02
> > Jack
> >
> > ----- Original Message -----
> > From: <odempsey@b...>
> > To: "ASP Databases" <asp_databases@p...>
> > Sent: Tuesday, August 20, 2002 7:25 PM
> > Subject: [asp_databases] connection to more than one database within a
site
> >
> >
> > > Hi
> > > are there performance issues in having a connection to more than one
> > database within a site? The reason why I ask is that we need to have 1
> > database (4MBs) on each of 30 sites in which there will be 6 common
tables.
> > However, there will also be 3 tables on each of these sites which will
have
> > data unique to each of these sites.
> > >
> > > I was thinking that the most efficient way to update the common tables
is
> > to upload a database containing these 6 tables to one site on the
Internet
> > server and then to ftp the database across to the other 29 sites through
the
> > large bandwidth connection available within the server provider's
network.
> > We could then upload a seperate database to each of the sites containing
the
> > unique tables for those sites.
> > >
> > > So to reiterate my question, are there performance issues involved
with
> > having a connection to more than one database within a site? Or are
there
> > other ways to solve this problem?
> > >
> > >
> > > Kind Regards
> > > Oliver Dempsey
> > >
> > >
> > >
> > >
> >
> >
>
>
>
Message #6 by "the Office of Brent Allen VanderMeide" <ccbbttmm@a...> on Wed, 21 Aug 2002 11:06:40 -0600
|
|
Just my $ .02,
I agree with Jack on this one. Unless there's a major concern about the
data being collected in 1 database, why have several databases spread
out different web sites. Yes, it will require additional programming.
Simply add a field named "SiteID" to each table, then; for each site,
for each query add the SiteID to the WHERE clause of each query. Site 1
may be "WHERE SiteID = 1".
There's not a large issue with running multiple connections properly.
However it is very easy to program improper connections. This meaning,
if you do not clear your variables.
For example
Improper page opening & closing
-----------------------------------------------------
-- Beginning of page --
<%
DIM objAdoConnection
SET objAdoConnection = Server.CreateObject("ADODB.Connection")
objAdoConnection.open "database connection information"
%>
' Content
-- End of Page --
Improper page opening & closing
-----------------------------------------------------
-- Beginning of page --
<%
DIM objAdoConnection
SET objAdoConnection
Server.CreateObject("ADODB.Connection")
objAdoConnection.open "database connection information"
%>
Web page Content
<%
objAdoConnection.close 'Closing
connection
SET objAdoConnection = Nothing 'Killing object
variable.
%>
-- End of Page --
You must clear your variables. It is also important to close your
connection before killing the object variable.
The reason why it is important is because in the first example every
time that page runs, more memory will be accumulated and never let go.
Hence, eventually causing the server to crash.
It is also important to close your connection and recordset objects
before killing them because their "open" methods use variables which in
some cases are released ONLY when you call the close method.
This is a major importance for keeping a server from crashing once a
week, and in your case once a day.
You may be using a session state Connection object. In this case you
will want to place proper connection closing statements in the
"Session_OnEnd" subroutine in your global.asa file.
If you're not using a session state Connection object then I would
recommend you create an Include file that connects to your database(s),
and an include file that disconnects your database(s) and clears your
variables.
Thank you
Brent Allen VanderMeide
Intermountain Software Solutions
Senior Web / Application Engineer
-----Original Message-----
From: Jack Dunstan [mailto:jdunstan7@h...]
Sent: Wednesday, August 21, 2002 9:26 AM
To: ASP Databases
Subject: [asp_databases] Re: connection to more than one database within
a site
Oliver,
You wrote - "We could then upload a seperate database to each of the
sites
containing the unique tables for those sites." So I was assuming you
were
talking about have 2 seperate databases, and thus needing to have 2
connections to the databases, 1 for the 6 common tables and 1 for the 3
site
unique tables. If you had everything in one database you would only
need 1
connection.
Jack
----- Original Message -----
From: <odempsey@b...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, August 21, 2002 1:48 AM
Subject: [asp_databases] Re: connection to more than one database within
a
site
> Hi Jack
> thanks for your reply. I don't see how this would make updating of
the 6
tables any more efficient
>
>
> Kind Regards
> Oliver Dempsey
> 00353 (0)502 26263
> 00353 (0)86 8219430
>
> ----- Original Message -----
> From: "Jack Dunstan" <jdunstan7@h...>
> To: "ASP Databases" <asp_databases@p...>
> Sent: Wednesday, August 21, 2002 2:25 AM
> Subject: [asp_databases] Re: connection to more than one database
within a
site
>
>
> > Oliver,
> >
> > Just a thought - are the 3 tables that are unique, unique in
structure
or
> > data only. If its data only, could you add an additional field to
each
> > table, like siteId, including it as part of the primary key, which
then
> > would allow you to include the 3 tables as part of the main
database.
As
> > far as performance I don't have statistical data to provide, but
limiting
> > the number of "open" connections to one database or multiple
databases
is
> > going to limit the network traffic.
> >
> > My $ .02
> > Jack
> >
> > ----- Original Message -----
> > From: <odempsey@b...>
> > To: "ASP Databases" <asp_databases@p...>
> > Sent: Tuesday, August 20, 2002 7:25 PM
> > Subject: [asp_databases] connection to more than one database within
a
site
> >
> >
> > > Hi
> > > are there performance issues in having a connection to more than
one
> > database within a site? The reason why I ask is that we need to
have 1
> > database (4MBs) on each of 30 sites in which there will be 6 common
tables.
> > However, there will also be 3 tables on each of these sites which
will
have
> > data unique to each of these sites.
> > >
> > > I was thinking that the most efficient way to update the common
tables
is
> > to upload a database containing these 6 tables to one site on the
Internet
> > server and then to ftp the database across to the other 29 sites
through
the
> > large bandwidth connection available within the server provider's
network.
> > We could then upload a seperate database to each of the sites
containing
the
> > unique tables for those sites.
> > >
> > > So to reiterate my question, are there performance issues involved
with
> > having a connection to more than one database within a site? Or are
there
> > other ways to solve this problem?
> > >
> > >
> > > Kind Regards
> > > Oliver Dempsey
> > >
> > >
> > >
> > >
> >
> >
>
>
>
|
|
 |