Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2018 January SQL Server 2016: sys.dm_column_store_object_pool to find memory pool usage by Columnstore Indexes

SQL Server 2016: sys.dm_column_store_object_pool to find memory pool usage by Columnstore Indexes

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

SQL Server 2016 introduced sys.dm_column_store_object_pool system view for finding the memory pool usage by different types of Columnstore Index objects.

I am sharing one T-SQL Script to find memory pool usage by Columnstore Indexes.
You can find one object_type column in the result set of below query.

The information of object_type column is:

1 = COLUMN_SEGMENT
2 = COLUMN_SEGMENT_PRIMARY_DICTIONARY
3 = COLUMN_SEGMENT_SECONDARY_DICTIONARY
4 = COLUMN_SEGMENT_BULKINSERT_DICTIONARY
5 = COLUMN_SEGMENT_DELETE_BITMAP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SELECT
OBJECT_NAME(csop.[object_id]) AS TableName
,[i].[name] AS IndexName
,[c].[name] AS ColumnName
,[csop].[column_id]
,[csop].[row_group_id]
,[csop].[object_type_desc]
,[csop].[access_count]
,[csop].[memory_used_in_bytes]
,[csop].[object_load_time]
FROM sys.dm_column_store_object_pool AS csop
LEFT OUTER JOIN sys.index_columns AS ic
ON [ic].[index_column_id] = [csop].[column_id]
AND [ic].[index_id] = [csop].[index_id]
AND [ic].[object_id] = [csop].[object_id]
LEFT OUTER JOIN sys.columns AS c
ON [ic].[object_id] = [c].[object_id]
AND [ic].[column_id] = [c].[column_id]
LEFT OUTER JOIN sys.indexes AS i
ON [i].[object_id] = [csop].[object_id]
AND [i].[index_id] = [csop].[index_id]
ORDER BY [csop].[memory_used_in_bytes] DESC
GO

Jan 11, 2018Anvesh Patel
SQL Server 2014: sys.column_store_row_groups to find information on Columnstore row groupsSQL Server 2016: sys.dm_db_column_store_row_group_physical_stats to find fragmentation of Columnstore Indexes

Leave a Reply Cancel reply

CAPTCHA
Refresh

*

Anvesh Patel
Anvesh Patel

Database Engineer

January 11, 2018 SQL Server, SQL Server DBA ScriptAnvesh Patel, Columnstore Index, database, database research and development, dbrnd, memory pool usage, SQL Query, SQL Server, SQL Server 2016, SQL Server Administrator, SQL Server Monitoring, SQL Server Performance Tunning, SQL Server Tips and Tricks, sys.columns, sys.index, TSQL
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....