newbie wants to know what a HEAP is ?

  • Anyone ?

    Thanks 🙂

  • A heap is how much trouble you're in if you mess up your database.

    Seriously now, did you try to Google Heap?

    Here's the first link Google showed me.

    https://msdn.microsoft.com/en-us/library/hh213609%28v=sql.110%29.aspx



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Cool!

    You thought I didn't GOOGLE ha ?

    Take a look at the attached! LOL

  • mw112009 (1/11/2016)


    Cool!

    You thought I didn't GOOGLE ha ?

    Take a look at the attached! LOL

    Yes, "an untidy collection of things piled up haphazardly" described a heap table. By definition, a heap is a table without a clustered index, meaning the rows are physically sorted in the order in which they were inserted. For various technical reasons, you ideally want a table to be clustered on a unique sequential identifier. It helps minimize table and index fragmentation, and results in more efficient joins with other tables when aligned on the same key column.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • I like to compare index structures to books. The comparison does not hold all the way through, but it does well for most of the basics.

    A nonclustered index is like the keyword index at the end of a book - a sorted list of keywords, with a reference (ie the page numbers) to find all information about that keyword. There is no rule to the number of indexes - there can be one, none, or even multiple.

    A clustered index is like the page number - it defines how the book is physically organized. You expect page 234 to sit betwee 233 and 235. (That's what makes the keyword index useful, otherwise you'd still have to leaf through the book to find the right page).

    Now remove the cover and the binding, throw all the pages up in the air and wait until gravity has made them land again - there's the heap. (The only difference is that now the keyword index would no longer reference a page number, but the location in your room - three inches south and five inches west of the table, 3 millimeters above floor level)

    So I guess that you can say that the description you found on google is very accurate.

    (For more detailed information, try googling for something more specific - e.g. "SQL Server heap" gives me very good and appropriate hits).


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • mw112009 (1/11/2016)


    Cool!

    You thought I didn't GOOGLE ha ?

    Take a look at the attached! LOL

    Hint: try Googling: SQL heap

    How good the search results you get are depends a lot on your search terms.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • in simple words heap is a table without a clustered index to know more about heap you can take the help of this link:

    https://msdn.microsoft.com/en-us/library/hh213609.aspx

Viewing 7 posts - 1 through 6 (of 6 total)

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