Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesWhat is the use of running the command "CREATE STATISTICS"? SQL 2K. Thanks, Harry
Post Follow-up to this messageHi, You can use the CREATE STATISTICS command to create statistics on nonindexed columns. Also, you can execute the sp_createstats stored procedure, which creates single-column statistics for all eligible columns for all user tables in the current database. Thanks Hari SQL Server MVP "HarrySmith" < HarrySmith_56@hotmai l.com> wrote in message news:u2UUTBdrFHA.3604@tk2msftngp13.phx.gbl... > What is the use of running the command "CREATE STATISTICS"? > SQL 2K. > Thanks, > Harry > >
Post Follow-up to this messageFurther to Hari's post, statistics are used by the query optimiser when it's calculating the best possible way to access the data you're after. If you're after more info about stats, this whitepaper is really good (I just read it last week): Statistics Used by the Query Optimiser in Microsoft SQL Server 2005 <http://www.microsoft.com/technet/pr...5/qrystats.mspx> It talks specifically about SQL 2005 but the concepts are mostly related pretty closely to SQL 2000 too. -- *mike hodgson* blog: http://sqlnerd.blogspot.com Hari Prasad wrote: >Hi, > >You can use the CREATE STATISTICS command to create statistics on nonindexe d >columns. Also, you can execute >the sp_createstats stored procedure, which creates single-column statistics >for all eligible columns for all user tables in the current database. > >Thanks >Hari >SQL Server MVP > > >"HarrySmith" < HarrySmith_56@hotmai l.com> wrote in message >news:u2UUTBdrFHA.3604@tk2msftngp13.phx.gbl... > > > > > >
Post Follow-up to this messageThank you very much to both of you. Harry "Mike Hodgson" <mike.hodgson@mallesons.nospam.com> wrote in message news:eFg PIQerFHA.3884@TK2MSFTNGP11.phx.gbl... Further to Hari's post, statistics are used by the query optimiser when it's calculating the best possible way to access the data you're after. If you' re after more info about stats, this whitepaper is really good (I just read it last week): Statistics Used by the Query Optimiser in Microsoft SQL Server 2005 It talks specifically about SQL 2005 but the concepts are mostly related pre tty closely to SQL 2000 too. -- mike hodgson blog: http://sqlnerd.blogspot.com Hari Prasad wrote: Hi, You can use the CREATE STATISTICS command to create statistics on nonindexed columns. Also, you can execute the sp_createstats stored procedure, which creates single-column statistics for all eligible columns for all user tables in the current database. Thanks Hari SQL Server MVP "HarrySmith" < HarrySmith_56@hotmai l.com> wrote in message news:u2UUTBdrFHA.3604@tk2msftngp13.phx.gbl... What is the use of running the command "CREATE STATISTICS"? SQL 2K. Thanks, Harry
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread