Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-20
2
Medium Priority
?
391 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

618 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