Opening & Closing Connections for Multiple Databases

Discussion in 'Databases' started by Bruce, Nov 9, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    Opening a database connection takes up server resources and can cause performance issues.

    >Basically, since this is Access, I figured using multiple Databases, instead of one database with lots of tables, would allow for more user connections as the pages call the data independantly.

    This may not be true. It depends on how big the database is.

    I suggest you keep everything in 1 single DB and see if performance is acceptable. This way, it also make it easier for upgrading to MS SQL.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  2. Ok thanks, good idea. Ive decided to do that. Well as there are seperate applications I will keep all the tables related to the applications in its particular database, so I cut down on the amount of databases. I dont expect to get a huge amount of traffic anyway with this site, as it is only Bahamas Real Estate, though you never know.
     
  3. Firstly this is an Access Database:

    Are there any draw backs to opening a connection, closing it, then opening another then closing it right after each other, while at the same time on another page another user is opening a connection to another Database.

    For example, if I have 3 database files

    DB1
    DB2
    DB3

    On one of my pages, the script opens DB1 and checks for something, if that something is true, then it closes DB1 and opens DB2, then performs something and closes DB2.

    At the same time or any given time, DB3 can also be opened, while all this is going on with DB1 and DB2.

    Can this do anything to slow down the server, having multiple connections open at one time, or opening then closing right after the other. Also, what if multiple people are doing this at one time, any draw backs or will it work the same either way? One web page only will be performing all of this. EG default.asp?i=1 opens DB1 and then DB2, default.asp?i=2 opens DB3, so there can be multiple users on at the same time performing all of this.

    Basically, since this is Access, I figured using multiple Databases, instead of one database with lots of tables, would allow for more user connections as the pages call the data independantly.

    Also, im using GetRows and cacheing the result in an application variable for every 2 hours, so ofcourse this will help, but incase I dont use the cacheing I want it to be done the best way otherwise. (apart from using SQL server, for now)

    Thanks

    Rory
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page