Information about Statistics

  • Hi Guys.......

    1. What is statistics and how to see statistics through command ?

    Also how to update statistics and when to update statistics also let me know if any one knows.

    Also give me commands list of statistics.....

    2. How to create new table which structure should be same as another table ?

    Reply.....thanks

  • 1. What is statistics and how to see statistics through command ?

    Also how to update statistics and when to update statistics also let me know if any one knows.

    Also give me commands list of statistics.....

    Check this.

    http://www.sqlservercentral.com/articles/Performance+Tuning/70647/

    2. How to create new table which structure should be same as another table ?

    There are a several ways, you can generate the scrip and replace with New name.

    Or simply use this command but it wont copy the index and constrains.

    Select * Into NewTbl From existingTbl Where 1 = 2

    java[/url]

  • another very nice read on sqlserver statistics : SQL Server Statistics by Holger Schmeling

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • salum (12/25/2011)


    Select * Into NewTbl From existingTbl Where 1 = 2

    It does the same, but personally I prefer:

    select top (0) * into NewTbl from existingTbl

    Even the execution plan is the same, so it's all up to your taste 🙂



    Ole Kristian Velstadbråten Bangås - Virinco - Facebook - Twitter

    Concatenating Row Values in Transact-SQL[/url]

  • Saggy (12/25/2011)


    Hi Guys.......

    1. What is statistics and how to see statistics through command ?

    Also how to update statistics and when to update statistics also let me know if any one knows.

    Also give me commands list of statistics.....

    2. How to create new table which structure should be same as another table ?

    Reply.....thanks

    These questions don’t look like practical (problem) questions (at least in the group). I assume they are interview questions and if you are preparing yourself for interviews by remembering (mug up) then you are on wrong track. A good interviewer will catch you.

    If you are lucky & get the job, you will find difficulty in routine operations because mug up answers won’t stay in your mind for long.

    If you confirm that my assumption is right, I (& many here) will guide you on a proper way of learning that will help you in long run.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply