Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Conntection times to MSSQL
Old 05-29-2006, 05:53 PM Conntection times to MSSQL
Experienced Talker

Posts: 34
Trades: 0
I am using MSSQL + ASP.To load my home page, I have configure my home page code to connect to MSSQL server at least 5 times..I have some Tables like News,Pics,Products,.. in MSSQL Database and I want to insert 5 new fields from each table to mu home page.I wonder is it a right method or not.Another choice

Last edited by s2002; 05-29-2006 at 05:54 PM..
s2002 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-29-2006, 09:21 PM Re: Conntection times to MSSQL
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
That really depends on the nature of your database and the queries used to access it.

If it's a relational database, some of the queries may be built using joins to access information from multiple tables at once.

The best thing you can do is look at your situation individually (tables, etc.) and figure out how you can combine queries where and when possible.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 05-29-2006, 10:50 PM Re: Conntection times to MSSQL
Experienced Talker

Posts: 34
Trades: 0
thanks ADAM,
My question is that, if the amount of table fields effects on the page load elapsed time. Is it better for me to make queries in my DB and then ASP codes read from queries tables in my DB.
s2002 is offline
Reply With Quote
View Public Profile
 
Old 05-30-2006, 03:07 AM Re: Conntection times to MSSQL
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
again the answers is;

it depends.

is your database table structure normalised to reduce redundant data
are your queries optimised and not using such things as "SELECT * FROM ... "

as adam said,
Can you use JOINs to reduce the number of DB round trips?

plus many other things.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-30-2006, 12:20 PM Re: Conntection times to MSSQL
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
If you mean stored SQL procedures, then in very general terms, yes it can.

Mind you, it would depend on the complexity of the query and the resulting recordset as to how much difference it really would make. And if you ever need to move the database, stored procedures do become a problem.

For the most part, it's not even necessary. 99.99999% of ASP-based sites don't even generate enough traffic to necessitate the use of an SQL Server backend in the first place (if coded properly, which most aren't). I can show you sites that get 100,000 page views per month that work off of an Access backend and you'd never even know it.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 05-30-2006, 05:23 PM Re: Conntection times to MSSQL
Experienced Talker

Posts: 30
Trades: 0
By the way, if you are using MS SQL, you can use its Query Analyser to iron out what mechanisms are involved for your SQL statements. For example, it will show you whether your SQL statements are using index or table scan is being used. If you notice that table scan is involved in your SQL execution plan, then you need to add some relevant indexes for your SQL statement to speed things up.
__________________

Please login or register to view this content. Registration is FREE
MyOpinion is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Conntection times to MSSQL
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16636 seconds with 12 queries