Viewing 15 posts - 48,046 through 48,060 (of 49,552 total)
Edit: Cross-post...
SQL doesn't insert one row at a time. It inserts the entire batch at once The Where clause (with exists) executes before the insert occurs. The operations in the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 3:59 am
Easiest way to do that is with a numbers table. It's a very handly thing for a lot of problems. I'm creating a temp numbers table, but you can create...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 3:49 am
Your PK is on CustID?
At the point that the exists runs, the row
01 Phil_1
is not in Table1, hence the second row twith aa 01 id si not filtered out.
The distinct...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 3:45 am
No need to start a new thread for this problem. It will just fragment replies and waste people's time.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 3:21 am
As an alternative to the variables, may I suggest creating the proc WITH RECOMPILE so that each execution gets the optimal plan. It will completely eliminate parameter sniffiing.
With variables, while...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 2:40 am
Bear in mind that you'll need a work permit to work in either country.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 2:38 am
In theory, and providing there are no temp tables involved, yes.
I know 2005 when you do an estimated plan, fetched the plan from the cache it it's there. I haven't...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 2:20 am
Jeff Moden (12/12/2007)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 1:55 am
Depends what you want. I doubt there's much of a performance difference, if any.
Ifyou want the number of characters in the string, except trailing spaces, use LEN. If you what...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 1:25 am
With an appropriate index*, the first 2 can do an index seek to get the data. The third, since it has functions applied to the columns, will do at best...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 12:34 am
Paste the call to the proc in QA and run it with the exec plan on. It should give you back the same plan as from whatever app its called...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 12:30 am
Jason Selburg (12/11/2007)
In 2005, the MERGE command can be used. I'm not 100% on the syntax, but I've read it can be done.
Afaik, Merge didn't make it into SQL...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 12:21 am
Yup. I've seen some nasty stuff from vender software. From 38 indexes in one table, with the same leading column, to 'temporary' tables that don't get dropped (we had 150000...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 12:05 am
Brandie Tarvin (12/11/2007)
Do you know what's wrong with the above scenario?
Yeah, witness servers aren't exactly expensive. SQL Express and a desktop work just fine.
:hehe: 😉
Without a witness, mirroring won't...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 12, 2007 at 12:01 am
Why the recovery interval?
Also what you can do is change the server-wide max degree of parallelism. I don't rcommend dropping it to 1. What I normally do is set it...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 11, 2007 at 11:40 pm
Viewing 15 posts - 48,046 through 48,060 (of 49,552 total)