Staging table as a heap

  • I've inherited an ETL process that loads a few thousand records from a flat file (.csv) into a staging table. This staging table doesn't have a clustered index nor a PK. While it doesn't cause any problems with performance, it still rubs me the wrong way. It seems I should at least have an identity PK on the table and I always default to adding a clustered index.

    Am I being too pedantic here?

    Your opinions appreciated?

    Thanks,

    Rob

  • If it's loaded all at once from an import process and truncated afterwards, then a PK probably would only add extra overhead when loading. I'd only add indexes if moving the data into production involves filtering it in some way, or if you need to do updates to the data in the staging table.

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

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