fragmented indexes cause TEMPDB growth?

  • If there is fragmentation in some of the indexes being used in a multi-table join query, would that cause TEMPDB to grow?

    There are large amounts of 'internal_object_reserved_page_count', corresponding to less 'unallocated_extent_page_count' numbers as the query runs then eventually fills up the drive that TEMPDB is on, over 146GB of space.

  • sqlenforcer (8/27/2014)


    If there is fragmentation in some of the indexes being used in a multi-table join query, would that cause TEMPDB to grow?

    No. Fragmentation has to do with the arrangement of pages on disk. It has no relevance once pages are in memory, which they will be when the query execution engine is using them. By the time the rows get to the point of being added to work tables, their physical storage details are irrelevant.

    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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • sqlenforcer (8/27/2014)


    If there is fragmentation in some of the indexes being used in a multi-table join query, would that cause TEMPDB to grow?

    You're experiencing heavy tempdb usage during execution of a query. Rewriting the query may reduce or even eliminate tempdb usage: the execution plan (actual, not estimated) for the query is the first place to look for potential improvements. If you can post an actual execution plan here - as a .sqlplan file attachment - folks will provide you with suggestions for improvement.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • Tune the query and check for missing indexes. fragmentation nothing to take with tempdb grow unexpectedly.

    also check for other process setup you have in environment.

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

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