Viewing 15 posts - 24,961 through 24,975 (of 49,552 total)
Intelligent indexing script: http://sqlfool.com
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
July 11, 2011 at 4:48 pm
Statement level.
To get the plan optimisation for queries like the following, the recompile has to be a hint on the query: OPTION(RECOMPILE)
SELECT ...
WHERE (Col1 = @var1 OR @var1 IS NULL)
...
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
July 11, 2011 at 2:22 pm
pdanes2 (7/11/2011)
GilaMonster (7/11/2011)
pdanes2 (7/11/2011)
You say index the table with included columns, but the primary key is clustered automatically (and not just by default, as you wrote earlier, but unchangeably so)
By...
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
July 11, 2011 at 2:00 pm
Database Tuning Advisor
Be careful. Don't accept it's recommendations without testing them carefully. Implement ones that help, not all of them. It's a good place to start tuning, it's a bad...
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
July 11, 2011 at 12:59 pm
You might want to play it safe and put [] around the table name, in case you have some which are not valid identifiers or are reserved words.
EXEC sp_MSforeachtable @command1=...
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
July 11, 2011 at 12:54 pm
Ninja's_RGR'us (7/11/2011)
Because of that I'm...
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
July 11, 2011 at 12:47 pm
kramaswamy (7/11/2011)
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
July 11, 2011 at 12:44 pm
only4mithunc (7/11/2011)
So you mean to say that the multivalued table valued functions are pre-compiled ( i.e they get compiled during the first run ) ?
As far as I recall, they...
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
July 11, 2011 at 12:42 pm
pdanes2 (7/11/2011)
Family_Idx, defined one of two ways - Index or Unique Key - I still can't figure out the difference:
There isn't much of one.
You say index the table...
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
July 11, 2011 at 12:41 pm
mmcginty (7/11/2011)
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
July 11, 2011 at 12:37 pm
The plan compiled for that will have to have a check the second condition. That's because the plan has to be safe for reuse and if the plan had no...
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
July 11, 2011 at 10:46 am
jmaia (7/11/2011)
Have you minimised locking in the procedures ??[jmaia] Yes. At least all the selects in the sp's use NOLOCK.
Is that a good idea?
http://sqlblog.com/blogs/andrew_kelly/archive/2009/04/10/how-dirty-are-your-reads.aspx
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
July 11, 2011 at 9:48 am
Can be. Not as simple as that, but it's about giving the optimiser the option and seeing what it thinks.
Back to the original question though, short of better hardware I...
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
July 11, 2011 at 9:47 am
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
July 11, 2011 at 9:12 am
Though do note that OR and UNION may produce different results.
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
July 11, 2011 at 9:08 am
Viewing 15 posts - 24,961 through 24,975 (of 49,552 total)