?
Solved

Speed concern - SQL Server Management Studio Express SELECT statement & also filling of VB.ET dataaset

Posted on 2006-11-20
2
Medium Priority
?
390 Views
Last Modified: 2013-12-03
SQL Server 2005 Express, VB.NET 2005
Computer is a P4 3.2, 1gb DDR400 ram

I am questioning the efficiency of a database I am working with and have several pertinent questions I would like to ask.  

Having never used SQL Server until about six months ago I'm not sure what's appropriate and what's not from a speed standpoint.  I unfortunately have only MS Access to guage speed by.

I have created several indexes and unique keys in two tables and am attempting a simple select statement in the SQL Server Management Studio Express program.

QUESTIONS:
1)  When I open up my accounting table (24K records)....is it appropriate that it take 3-4 seconds to reach the end of the table while retrieving records?
2)  Is it better to include individual field names in a SELECT instead of SELECT *  ?
3)  I read a posting just a few minutes ago regarding the differences between MSDE 2000 and SQL Express where including [DATABASENAME].[dbo]. to SELECT statements improves access time.  Is there validity to this?
4)  I have the same table in an Access 2003 database.  When I open this table in Access there is no delay, with SQL Express there is...as stated in #1.  I thought SQL Server was suppose to be lightning fast.  What gives?


Sincerely,
Phil Tate
0
Comment
Question by:TSFLLC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Assisted Solution

by:Raynard7
Raynard7 earned 1000 total points
ID: 17984344
1. You should not really need to ever open 24k records at a time, if you are doing so then the speed problem is probably related to IO and networking (pulling the data from disk and sending it to you)
    If you need snapshots you can always use the TOP 1000 records for example.
2.  It is better to include the field names for performance, and only include the ones you need - this is also better practice for programming as you are guaranteed to have the field you requested present.
3.  This may increase performance, it may only do so fractionally (should not be much work for the sql engine to find the other tables) you would have to test it and see if this is applicable for your system.
4. When you talk about opening a table, in access all the data is not sent, only what you are looking at is sent to the monitor the rest remains on disk and untouched - this is updated when you scroll SQL Server is sending the complete table each time - as mentioned you really should not be looking at full tables as this is not really what RDMS systems are about - they are not spreadsheets.
0
 
LVL 4

Accepted Solution

by:
roshkm earned 1000 total points
ID: 17986054
1. SQL Server is fast and can handle millions transactions. Other db which outperform SQL is Oracle and DB2. So it shouldnt take that much time. If SQL is on a low end machine, yes, what ever u told is true :)

2. Yes. Provided the field name u are giving is a Primary Key or an indexed field. If u do so, there will be considerable performance difference.

3. I am not sure about the speed.  May be it will slow down, since it is going one level up and then identifying table, where as if u give a simple query, it will look for that table in the current db. We use the database name also if u have the data in multiple db.

4. Compare Access as butterfly and SQL as a Train. To travel 2m, butterfly will beat the train but that doesnt mean train is slower than a butterfly. I hope u got it.. :)

RKM.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question