Viewing 15 posts - 271 through 285 (of 388 total)
3 cursors inside a transaction. phew.
Also, there is a select X where there is a select subquery Y inside select X which itself is a column in a larger...
April 30, 2015 at 3:47 am
SQLBill (4/29/2015)
EXEC MasterInsertUpdateDelete @firstname = 'John', @lastname = 'Smith', @city = 'Denver', @StatementType =...
April 29, 2015 at 3:20 pm
Set first name=coalesce(@firstname,first name),last name =coalesce(@lastname,last name) etc.
A where clause in the select would also be a great idea.
April 29, 2015 at 3:06 pm
In QA, run a trace, then do one step/submit on your application and save the trace.
You may find that the application is doing thousands of calls to the DB the...
April 29, 2015 at 8:01 am
Regarding how to get the optimizer to do what you want when it seems like the engine has got the row counts wrong,
http://sqlbits.com/Sessions/Event14/Query_Tuning_Mastery_Clash_of_the_Row_Goals
There are more convensional methods but...
April 28, 2015 at 2:02 pm
Nested loop join on the slow plan between many to many and on the fast one it is nested loop 1 to many.
So the faster operation should be Many to...
April 28, 2015 at 8:56 am
Looking at the amount of left joins together with the top 1, it looks like the query is trying to end up with a pivot?
Have you explored using pivot to...
April 28, 2015 at 7:02 am
Firstly, results are never cached. It will be pages that are being read physically which get cached.
Use the query found here to see if your query is running out...
April 23, 2015 at 3:02 pm
Going to take a stab in the dark.
I think you probably should do the ranking all by itself inside a windowed query and then do the case statement on the...
April 23, 2015 at 10:53 am
This is just an example.
Take note of the columns chosen as the indexing column, as well as partitioning column.
Be very clear that you know the difference between the partitioning and...
April 21, 2015 at 8:10 am
Was more looking for table definition.
What you can do is join sys.indexes to sys.partitions and filter on objectname of parentobjectid =yourtable And indindex_id <2.
This will show you your...
April 21, 2015 at 12:21 am
Looking at that scale, it may not be practical to change the clustered indexes to use another key so Gail's recommendation should be the least painful.
That being said, just be...
April 20, 2015 at 12:14 pm
declare @Description varchar(50) = "textbox_search.Text.Trim()"
SELECT IT.tr_id AS [Tr Id], IT.tr_date AS [Tr Date], IT.tr_type AS [Tr Type]
, IT.tr_no AS [Tr No], IT.item_id AS [Item Id], IT.item_no AS [Item No]
, IT.item_des...
April 20, 2015 at 11:56 am
GilaMonster
you need to create or rebuild the clustered index on the partition scheme.
That's why I asked for objects to be scripted out completely, but it was not to be.
April 20, 2015 at 7:21 am
do an outer apply onto the subquery and then pass the columns from the outer apply into 2 different columns in the select.
ACtually, you could probably just do a straight...
April 20, 2015 at 6:00 am
Viewing 15 posts - 271 through 285 (of 388 total)