This tag pertains to performance issues with Structured Query Language (SQL).The performance bottlenecks faced when managing data in relational database management systems. This tag is for specific questions related to performance improvement on back-end.

learn more… | top users | synonyms

3
votes
2answers
22 views

Are Columns Not Selected in SQL Views Executed?

I wasn't able to come up with the right keywords to search for the answer for this, so apologies if it was answered already. Consider the following SQL view: CREATE VIEW View1 AS SELECT Column1 ...
0
votes
1answer
19 views

Improving query speed by removing sub queries

I'm looking to speed up this query. At the moment it takes just over 20 seconds to execute which is terrible. I can't find a way to remove the sub queries by using and JOIN functions. SQL: ( ...
0
votes
0answers
12 views

SQL Server 2005: High availability config and random INSERT timeouts [closed]

We have a production site with medicore load on it; most of the times low load) on high availability configuration. Problem is, our insert statements are timing out randomly and we can't seem to ...
1
vote
3answers
63 views

SQL Query optimization : Taking lots of time

I am having the following query used to retrieve a set of orders: select count(distinct po.orderid) from PostOrders po, ProcessedOrders pro where pro.state IN ('PENDING','COMPLETED') and ...
0
votes
0answers
49 views

Oracle view logic or performance tuning on case expression

I have written a view logic to extract the data based on the requirement. I need the suggestion or solution to improve the performance of the view logic. MYTABLE: |SID | SREF | STYPE | SQID ...
0
votes
2answers
34 views

Regarding Performance Benefits of WHERE clause conditions order

Consider 3 tables (* for primary key, + for foreign): User {*id:INTEGER, name:VARCHAR(45)} Flight {*id:INTEGER, service:VARCHAR(45), departureDate:DATETIME} Reservation { +userId, +flightId } Data: ...
6
votes
1answer
83 views

Does order of items in an SQL: WHERE IN () matter?

Does the order of the values in a WHERE IN clause matter? (this is on Firebird SQL if that is important) Such as does: where field1 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) offer a performance increase ...
1
vote
0answers
125 views

why query shows in suspended task state and LCK_M_X wait type

I am working on winform application using C# 4.0, back end SQL SERVER 2012. Some time, my software seems to be hang, because queries become pending, because one query shows in activity monitor in ...
0
votes
0answers
116 views

How do I improve the following SQL that has self-join

After doing a select, I am doing a self-join and a distinct on the data. I am not sure if there is a better way to write this query. Could you suggest? Below is the Query, and the explain plan ...
0
votes
1answer
145 views

Partition table but group together based on multiple columns

I have an interesting problem with partitioning a table into groups. I have a group of Tourists - each speak a single language and/or are part of a family. I need to partition the table into groups, ...
0
votes
0answers
38 views

SQL Profiler shows unlogic reads count when using table-types

Wanted to Analyse the reads of one of our procedures which uses a user-defined table type as the procedure Argument. While separating the individual queries, the SQL Profile showed me strange Reads ...
5
votes
1answer
123 views

SQL Hint to load entire table into RAM before execution?

I'm running some aggregation queries on some very large tables in an OLAP environment. I'm currently bottlenecked by disk IO at 200 MB/s. I'm doing these queries on a machine with 92 GB of RAM. Is ...
0
votes
1answer
77 views

How do I speed up the execution of my sql query that generates category breadcrumbs for over 458,000 records?

I was messing around with the Nested Set Hierarchy Model and have a category table called CategoryNest with the fields CategoryID int identity, CategoryName nvarchar(100), L int, R int, CreatedOn ...
0
votes
3answers
57 views

My SQL Query is very slow with 50K+ records

I have a table called links in which I am having 50000 + records where three of the fields are having indexes in the order link_id ,org_id ,data_id. Problem here is when I am using group by sql ...
0
votes
1answer
59 views

SQL performance replace

I have the following query which I need to improve performance DECLARE @number varchar(40) = '0800001001' SELECT Id FROM Table1 WHERE (REPLACE(Phone1, ' ','') = @number) OR ...

1 2 3 4 5 6
15 30 50 per page