Solved

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

Posted on 2006-11-20
2
381 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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

759 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now