In SQL Server 2012, queries exist for table with Columnstore index, and Waittype:htmemo and Htbuild appear

Source: Internet
Author: User

There are two tables in the DW, nonclustered ColumnStore Index is created on littletable and bigtable,bigtable, and the two tables are queried, such as the scirpt below. In the query, Waittype:htmemo and Htbuild appear, the query speed is extremely slow, more than 10 hours can not produce results.

Select a few columns,,,  from  with (NOLOCK) Inner Join  with (nolock)      on Lt. Int_col1=or Lt. Int_col2=bt. Int_col4


I modified the query condition to be or Lt. INT_COL2=BT. Int_col4 Condition Delete, execute again, query result seconds out.

Google on the internet to the next two of these waittype

Htmemo (HT = Hash Table, MEMO = memory)

Htbuild (HT = Hash Table, build= BUILD)

This-wait type (and the other ht* waits) was when a thread was waiting for access to the shared hash table used during batch -mode processing. SQL Server used to use a hash table per thread and SQL Server now uses a shared hash table. This is made to reduce the amount's memory required for the hash table, but comes at the expense of these waits W Hen synchronizing access to the hash table. Typically these waits occur when queries involve Columnstore indexes, but they can also occur without Columnstore indexes Being involved if a hash operator runs in batch mode.

Excerpt from "What's that Htdelete wait type?"

It now uses one shared hash table instead of Per-thread copy. This provides the benefit of significantly lowering the amount of memory required to persist the hash table but, as a CA N Imagine, the multiple threads depending on this single copy of the hash table must synchronize with each other before, F or example, deallocating the hash table. Those threads wait on the Htdelete (Hash Table DELETE) wait type.

In SQL Server 2012, queries exist for table with Columnstore index, and Waittype:htmemo and Htbuild appear

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.