• Yusuf Ali Bhiwandiwala (3/27/2013)


    Vedran Kesegic (3/26/2013)


    Heap should have no indexes. Try with TABLOCKX hint.

    Hi Vedran,

    I couldn't quite connect your two sentences:

    "Heaps should have no indexes" (heaps can have non clustered indexes, can't they?)

    My sentence was: "Heap should have no indexes". Singular, not plural, your particular heap you want to achieve minimal logging.

    If you have NC indexes on the heap, they will be fully logged on nonempty tables (after the first batch if you bulk import in batches, your table is no longer considered empty) even if table itself is minimally logged.

    Maybe identity problem would disappear if you choose that value is imported instead of auto-generated.

    Certainly, that should be in the BOL. You can add a comment there for others to know.

    _____________________________________________________
    Microsoft Certified Master: SQL Server 2008
    XDetails Addin - for SQL Developers
    blog.sqlxdetails.com - Transaction log myths