473,793 Members | 2,922 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there any way to improve the performance of select statements in MS SQL?

Hi All,
I am getting slower performance of select statements in MS SQL. I am
finding select statements in MS SQL are even slower than MS ACCESS. Is
there any way to improve the performance of select statements in MS
SQL by tuning the database of anything else??

Thanks in advance!
Hoque
Jul 20 '05 #1
3 2376
In article <b1************ **************@ posting.google. com>,
so******@yahoo. com says...
Hi All,
I am getting slower performance of select statements in MS SQL. I am
finding select statements in MS SQL are even slower than MS ACCESS. Is
there any way to improve the performance of select statements in MS
SQL by tuning the database of anything else??

Thanks in advance!
Hoque


That's a very open question with MANY answers:

Several things come to mind:

Improperly configured drive arrays
Lack of proper indexes or clustered index
TOO MANY indexes
Failure to run a maintenance plan on the tables
Lack of memory or CPU
Improperly coded select statements - never use SELECT *, always specify
the columns you want.

--
--
sp*********@rro hio.com
(Remove 999 to reply to me)
Jul 20 '05 #2
so******@yahoo. com (Leader) wrote in message news:<b1******* *************** ****@posting.go ogle.com>...
Hi All,
I am getting slower performance of select statements in MS SQL. I am
finding select statements in MS SQL are even slower than MS ACCESS. Is
there any way to improve the performance of select statements in MS
SQL by tuning the database of anything else??

Thanks in advance!
Hoque


There are things you an do
1. If the query is complex try rewriting the logic of the joins e.g.
instead of selecting from tableA joining on to tableB try the reverse.
2. Avoid using LIKE as this causes a table scan to e performed
3. Have the tables you are using in your query got appropriate
indexes? beware of adding indexes as other parts of your application
may slow down because the system has to maintain an additional index.
4. If it has suitable indexes is the index appropriate for being made
a clustered index? There can only be 1 clustered index on a table
as this determines the physical placement of the rows on the disc.
Also if the index has values inserted anywhere in its expected range
of values updating may be slowed too much.
Just a few ideas

Hope this helps

Duncan
Jul 20 '05 #3
Not without knowing what you are doing.

Run the query in query analyser and look at the execution plan.
This will tell you which tables are causing the problem and you can
index them or recode the query appropriately.
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
13836
by: Roy Smith | last post by:
I've been running some benchmarks to compare streams and stdio performance. I've always suspected stdio was faster, but was astonished to discover how much faster. I timed the following running into /dev/null, as well as the same loop using printf(). int main () { for (int i = 0; i < 1000 * 1000; ++i) { cout << "i = " << i << '\n'; }
6
6786
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
2
4909
by: Jaidev Paruchuri | last post by:
I have a table called work_order which has over 1 million records and a contractor table which has over 3000 records. When i run this query ,it takes long time since its grouping by contractor and doing multiple sub SELECTs. is there any way to improve performance of this query ?? ------------------------------------------------- SELECT ckey,cnam,t1.contractor_id,count(*) as tcnt,
12
8354
by: serge | last post by:
I have an SP that is big, huge, 700-800 lines. I am not an expert but I need to figure out every possible way that I can improve the performance speed of this SP. In the next couple of weeks I will work on preparing SQL statements that will create the tables, insert sample record and run the SP. I would hope people will look at my SP and give me any hints on how I can better write the SP.
1
1816
by: rsarath | last post by:
Hello, I have the following setup and I would appreciate any help in improving the performance of the query. BigTable: Column1 (indexed) Column2 (indexed) Column3 (no index) Column4 (no index)
6
3305
by: George McLean | last post by:
Hello, I am trying to isolate some performance issues. The database is DB2 v8.1 running on a Win2000 server with 4 processors and 1gb of RAM. The application is a GIS application that uses ADO to access the database. It was not written specifically for DB2 and I think almost all queries are running as dynamic queries. The performance issue arise when users are
3
4175
by: Mario.Reif | last post by:
We have developed an application which was running under DB2 v7.2.5 quite well for some years. Four weeks ago we installed DB2 v8.1.5 Express Fixpak 5 on a new Server (hardware is nearly the same as on the DB2 v7.2.5 machine). The new Server runs on Windows 2003. Last week we installed another server with the same hardware with DB2 8.1.5 Workgroup Server Fixpak 5 under Windows 2000 Server. Both servers running DB2 v8 databases are about...
2
8440
by: lelandhuang | last post by:
I am developing reporting service and using lots of 'LEFT OUTER JOIN', I am worried about the performance and want to use some subquery to improve the performance. Could I do that like below, SELECT * FROM TableA LEFT OUTER JOIN TableB
2
2776
by: sdanda | last post by:
Hi , Do you have any idea how to improve my java class performance while selecting and inserting data into DB using JDBC Connectivity ......... This has to work for more than 8,00,000 of records ..... Can you give some performance tips if you have known 1) For this I am using oci driver ( because I m using oracle 10g) instead of thin driver 2) In that programme I m using prepared statement instead of statement 3) I am...
0
9670
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10211
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10159
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3719
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.