Viewing 15 posts - 1 through 15 (of 79 total)
WITH ColumnStoreIndexes AS (
SELECT
.[object_id]
, IndexName = .[name]
FROM
[sys].[indexes] AS
WHERE
.[type] IN (5,6) -- columnstore indexes
), NonClusteredIndex AS (
SELECT
.[object_id]
, IndexName...
October 23, 2017 at 9:48 am
Can you also post the query fo rrequirement 2
Identify all the tables which contain both columnsstoreindex and non-clustered index.
October 23, 2017 at 9:31 am
for requirement 2. i am doing below .
select distinct ss.name , object_name(st.object_id) , * from sys.indexes si
INNER JOIN sys.tables st on st.object_id = si.object_id
INNER JOIN sys.schemas ss...
October 23, 2017 at 9:03 am
Just to reiterate the whole discussion below is what I want to achieve.
1. Identify all tables should have more than one million records and doesn't have any columnstoreindex on it.
2. Identify...
October 23, 2017 at 8:47 am
even after including the group by it is not giving the right result.
October 23, 2017 at 8:43 am
SELECT distinct
ss.name,
object_name(sp.object_id)
, rows AS NoofRows
FROM sys.partitions sp
INNER JOIN sys.tables st on st.object_id = sp.object_id
INNER JOIN sys.schemas ss on ss.schema_id= st.schema_id
October 23, 2017 at 8:39 am
SELECT distinct
object_name(sp.object_id)
, rows AS NoofRows
FROM sys.partitions sp
INNER JOIN sys.tables st on st.object_id = sp.object_id
WHERE index_id NOT IN (5) -- clustered index or...
October 23, 2017 at 8:14 am
I am basically a Teradata developer with no knowledge of SQL but this report is really critical to other teams.
October 23, 2017 at 5:14 am
Please show some mercy on me, I have to complete this, I have only 30mins from now to share this report.
October 23, 2017 at 4:16 am
Can you please share the complete query instead of just half ?
October 23, 2017 at 3:53 am
DECLARE @TableRowCounts TABLE ([TableName] VARCHAR(128), [RowCount] INT) ;
INSERT INTO @TableRowCounts ([TableName], [RowCount])
EXEC sp_MSforeachtable 'SELECT ''?'' [TableName],COUNT(*) [RowCount] FROM ?' ;
SELECT...
October 23, 2017 at 3:25 am
Viewing 15 posts - 1 through 15 (of 79 total)