Solved

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

Posted on 2006-11-20
2
385 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
2 Comments
 
LVL 35

Assisted Solution

by:Raynard7
Raynard7 earned 250 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 250 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

790 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