Viewing 15 posts - 2,911 through 2,925 (of 5,841 total)
DOH!! Coffee clearly hadn't kicked in when I posted! At least I offered up a few improvements ... 🙂
May 29, 2012 at 8:27 am
Hardy21 (5/29/2012)
I have just given one option to change the query.
It will calculate and store filtered records in temp table so during delete, it will...
May 29, 2012 at 7:23 am
Brian Souder (5/16/2012)
May 29, 2012 at 7:15 am
SQL Kiwi (5/27/2012)
htiteuf (5/23/2012)
May 28, 2012 at 7:54 am
Welsh Corgi (5/24/2012)
SQLKnowItAll (5/15/2012)
May 25, 2012 at 7:52 am
Jayanth_Kurup (5/25/2012)
May 25, 2012 at 7:45 am
SOOOO many things could be at play here - you likely need to get a professional involved for a few hours to identify what the root cause is. Here...
May 25, 2012 at 7:42 am
Sean Lange (5/24/2012)
TheSQLGuru (5/24/2012)
Sean Lange (5/24/2012)
TheSQLGuru (5/24/2012)
Actually Grant I don't see even the slightest hint of a question from the OP - it is just a bunch of code. ...
May 24, 2012 at 10:00 am
Sean Lange (5/24/2012)
TheSQLGuru (5/24/2012)
Actually Grant I don't see even the slightest hint of a question from the OP - it is just a bunch of code. No request about...
May 24, 2012 at 9:16 am
I updated my post to include the connect bug link.
Here are my findings:
select MAX(mycol) from mytable_unpart where id<=10
NC INDEX scan
Table 'mytable_unpart'. Scan count 1, logical reads 283
select MAX(mycol)...
May 24, 2012 at 9:13 am
Gullimeel (5/24/2012)
Speaking of "based on testing, not a wild guess" - have you actually TRIED your SELECT MAX(... query on a large partitioned table?
I had put a real time example...
May 24, 2012 at 8:17 am
chandan_jha18 (5/24/2012)
TheSQLGuru (5/24/2012)
WHERE DsLocationCode = CAST(term.TerminalID AS VARCHAR)
AND...
May 24, 2012 at 8:00 am
The left join on the MIN is going to suck in any case, but these are the real killers here I bet:
WHERE DsLocationCode = CAST(term.TerminalID AS VARCHAR)
AND (sup.SupplierCode LIKE...
May 24, 2012 at 7:21 am
Grant Fritchey (5/23/2012)
Can you post the execution plan for the query? It's hard to suggest improvements not knowing the structure of your system, tables, indexes, constraints, etc.
Actually Grant I don't...
May 24, 2012 at 7:11 am
I would have (probably clustered) index on your datetimestamp column. then do something like this:
declare @error int, @rowcount int
set @rowcount = 9999
while @rowcount > 0
begin
begin tran
...
May 24, 2012 at 7:07 am
Viewing 15 posts - 2,911 through 2,925 (of 5,841 total)