what cases i use statistics to enhance performance large table ?

  • I work on sql server 2012 i read more about statistics is very good for enahnce performance query

    when or which cases i can use in it

    can you show please

    i don't need links or articles

    i need only cases i use statistics and if i show execution plan

    what indicator on execution plan that say

    there is no statistics or remaining statistics

    please help me

    i read more about statistics and enhance large tables

    so when i use it and which case or indicator execution plan that tell me must use statistics to enhance performance

  • ALL cases.

    All of them. Statistics are what the optimizer uses to determine how many rows are likely to be returned from a given table or index. Without statistics, the optimizer will always scan and perform hash joins. You'll likely never see a seek or other kinds of joins where they would be appropriate based on the data & the query.

    And it's not a question of YOU using statistics. The optimizer uses statistics. You need do nothing.

    EXCEPT

    You need to ensure that the automatic creation and update of statistics is enabled (in the vast majority of cases, there are exceptions where you turn these off, but they are exceedingly rare exceptions). Next, identify places where the automatic maintenance is not adequate and provide manual maintenance.

    You simply have to ensure that statistics are there for the optimzer and that they are as accurate as possible. You don't need to interfere in any other way to ensure that statistics are used.

    For scads more detail, I'd suggest getting a copy of my books linked below.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

Viewing 2 posts - 1 through 1 (of 1 total)

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