• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 23
  • Last Modified:

SQL Indexes

All,

I have a SQL table that is truncated and repopulated with data nightly.

The table also has an non-clustered index on the date field.

When the SQL table is truncated and repopulated with data nightly, does the index need to be reorganized to be effective?
0
isames
Asked:
isames
1 Solution
 
Pawan KumarDatabase ExpertCommented:
>>When the SQL table is truncated and repopulated with data nightly, does the index need to be reorganized to be effective?

Truncate deallocates all pages and when the new data loads physically creates new btree for your table. Since the tree is new we have zero fragmentation issue. So in this way data is organized. Note , when you truncate index will be there even there will be no data.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now