Click here to Skip to main content
15,912,897 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Query Question Pin
Anonymous27-Jul-05 13:41
Anonymous27-Jul-05 13:41 
GeneralRe: SQL Query Question Pin
matt cole27-Jul-05 13:43
matt cole27-Jul-05 13:43 
QuestionWhat’s the proper way to do object/relation mapping? Pin
Anonymous26-Jul-05 23:54
Anonymous26-Jul-05 23:54 
GeneralSQL Reporting Services Pin
Anonymous26-Jul-05 2:41
Anonymous26-Jul-05 2:41 
Question"auto update statistics" -- any reason to turn it off? Pin
devvvy25-Jul-05 16:34
devvvy25-Jul-05 16:34 
AnswerRe: "auto update statistics" -- any reason to turn it off? Pin
toxcct26-Jul-05 1:12
toxcct26-Jul-05 1:12 
GeneralRe: "auto update statistics" -- any reason to turn it off? Pin
devvvy26-Jul-05 22:32
devvvy26-Jul-05 22:32 
AnswerRe: "auto update statistics" -- any reason to turn it off? Pin
Mike Dimmick26-Jul-05 2:25
Mike Dimmick26-Jul-05 2:25 
The statistics are used by SQL Server's Query Optimiser to decide whether an index is suitable for use in a query. The statistics show how selective the index is - that is, how many rows will be returned for a particular set of key data. You can view the statistics with DBCC SHOW_STATISTICS.

For the statistics to be useful, they must be reasonably up-to-date. If they're out of date, or missing, the query optimiser may pick a poor execution plan. If 'auto update statistics' is on, SQL Server automatically updates the statistics after a certain number of changes (INSERT, UPDATE, DELETE) have occurred - a stored query plan may then be recompiled.

Statistics aren't just useful for deciding whether to use an index. They can also be used to decide which table should be scanned in the inner loop and which in the outer loop of a nested-loops join operation. For that purpose you can create statistics on a collection of columns. If the 'auto create statistics' option is on, SQL Server will automatically create statistics for columns used in queries that aren't indexed.

On the whole, I'd recommend leaving both options turned on. The cost of building the statistics is typically small.

Stability. What an interesting concept. -- Chris Maunder
GeneralRe: "auto update statistics" -- any reason to turn it off? Pin
devvvy26-Jul-05 22:35
devvvy26-Jul-05 22:35 
GeneralSQL database table , Data separated by "," Pin
phokojoe25-Jul-05 0:16
phokojoe25-Jul-05 0:16 
GeneralRe: SQL database table , Data separated by "," Pin
Mike Dimmick25-Jul-05 2:33
Mike Dimmick25-Jul-05 2:33 
Generalit is possible to take sql server2000 database backup on another machine's disc. Pin
under281124-Jul-05 22:22
under281124-Jul-05 22:22 
GeneralRe: it is possible to take sql server2000 database backup on another machine's disc. Pin
Alomgir Miah25-Jul-05 12:20
Alomgir Miah25-Jul-05 12:20 
GeneralGenerating SQL Script Pin
Tiger45624-Jul-05 21:12
Tiger45624-Jul-05 21:12 
GeneralDate Time in SQL Pin
wEb GuRu...24-Jul-05 19:47
wEb GuRu...24-Jul-05 19:47 
GeneralRe: Date Time in SQL Pin
Marc Soleda24-Jul-05 20:18
Marc Soleda24-Jul-05 20:18 
GeneralRe: Date Time in SQL Pin
wEb GuRu...24-Jul-05 22:17
wEb GuRu...24-Jul-05 22:17 
GeneralRe: Date Time in SQL Pin
Marc Soleda24-Jul-05 22:34
Marc Soleda24-Jul-05 22:34 
GeneralRe: Date Time in SQL Pin
Rob Graham25-Jul-05 2:40
Rob Graham25-Jul-05 2:40 
GeneralRe: Date Time in SQL Pin
JeyKey26-Jul-05 2:56
JeyKey26-Jul-05 2:56 
GeneralRe: Date Time in SQL Pin
wEb GuRu...26-Jul-05 3:19
wEb GuRu...26-Jul-05 3:19 
GeneralRe: Date Time in SQL Pin
| Muhammad Waqas Butt |27-Jul-05 4:26
professional| Muhammad Waqas Butt |27-Jul-05 4:26 
GeneralDate Time datatype in SQL Pin
wEb GuRu...24-Jul-05 19:43
wEb GuRu...24-Jul-05 19:43 
GeneralCreating Hyperlink in Datagrid Pin
wEb GuRu...24-Jul-05 19:34
wEb GuRu...24-Jul-05 19:34 
GeneralSelect all columns of table accept one Pin
wEb GuRu...24-Jul-05 19:25
wEb GuRu...24-Jul-05 19:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.