SQL Query Optimization Questions and Answers

Recent IT Questions

1 - 7 of 7
<<PREVIOUS 1 NEXT>>

Improving the initial speed of a SQL query

I have optimized my SQL query to the maximum extent. The first time I ran the query, it took 7 seconds; the next time it took half a second. Why did this happen? How can I make the query run faster the first time around?

View Answer   |  Jul 21 2009  6:11 PM GMT
SQL query optimization, SQL queries, SQL Query
asked by SQL Server Ask the Experts

  2445 pts.

Sql Query in AS400

I am trying to execute a Query String but I receive following error Query exceeded the specified time limit or storage limit however my query length is normal, nevertheless i have executed larger query too. How to solve this problem.

View Answer   |  Jul 20 2009  7:21 AM GMT
SQL Query, SQL query optimization
asked by Mr. SEA

  85 pts.

SQL Server 2005 Query Very Slow in the first run

Hi, I have an sql query which takes 8 seconds in the first run. The next run there after takes 0.5 seconds and all consecutive runs take 0.5 seconds. Is the plan getting cached? How do i make this query run in 0.5 second in the first run itself? Please find the query below. select...

View Answer   |  Jul 17 2009  10:15 AM GMT
SQL Server 2005, SQL query optimization, SQL queries
asked by Jsql

  140 pts.

Slow SQL Query

when i run below all SQL Query simulataneously against 1500000 Rows its take 10 minutes i put the non-clustered index on the columns TATCallType ,CallTo the data type of both columns is varchar select ID,AuditMaster_ID,CallTo,CallTypeTag into Auditdata_callto from auditdata where...

View Answer   |  Jul 13 2009  10:00 AM GMT
Slow SQL Query, SQL query optimization, SQL queries
asked by Mxaxyogesh2002

  30 pts.

Finding nth most recent action with SQL

I am trying to determine the date on which a certain number of things have happened cumulatively, eg I have a varying number of buyers each month. I want to find out on what date of that month, those buyers make their 3rd purchase. My SQL doesn't seem to support TOP or ROWCOUNT so I would...

View Answer   |  May 18 2009  10:11 PM GMT
SQL query optimization, COUNT statement, SUM statement
asked by Munona99

  5 pts.

Different Results on Insert Select than Select

I'm struggling, along with others, where I'm getting different results when doing an Insert select verses just the select. Lots of joins to get data from various tables. Only want the first record from the uniqfield table so created the tmp_uniqfieldid table with that item fielded, creation_ts ...

asked by Bem

  35 pts.

SQL order by Issue

Please help me write this. I need a SQL where the order by is done based on a variable passed to the query.SELECT * FROM (SELECT distinct gl.group_id, gl.group_name, gl.group_description, gl.status_code, gl.member_count, ...

View Answer   |  May 2 2009  4:44 PM GMT
SQL, SELECT statement, SQL query optimization
asked by Rohit3312

  25 pts.

1 - 7 of 7
<<PREVIOUS 1 NEXT>>