-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in the dbo.cstore_SuggestedTables #14
Comments
Hy, Oleg. Could you give more information:
|
Hey, it is:
|
Please run SELECT query from 155 line after Also you could remove PRIMARY KEY option for |
I have found the reason: for one of tables the query returns 3 rows with different values in the 'Size in GB' field. ObjectId TableLocation TableName Row Count Min RowGroups Size in GB Cols Count String Cols Sum Length 215723871 Disk-Based [dbo].[nodes] 160271556 154 24.694 10 0 332 |
Oleg, I will take a look at this in the next couple of days and will post the questions/answers. |
Oleg, could you provide create table script for reproducing this problem? Can you repeat this issue on another instance? |
@Oleg26Dev Did you solve your problem? If yes, could you close this issue? |
I have had more reports on this issue and planning to work on it over the next days. |
Unfortunately I am still unable to fully reproduce the issue... |
Sorry for the delaying. I have investigated the problem.
These are rows from indexes for this table, it seems they are the reason of the error in the procedure 215723871 PK_nodes 1 1 CLUSTERED 1 3 0 1 |
Hi Oleg, Thank you very much, for the details. If you can, please share here or send me via email the t-sql script creation for the table and indexes. Best regards, |
Hi Niko, |
Hi Niko,
there is a script for this table.
Ah! I have detected one duplicated index, may be it is the reason?
(in email)
Regards,
Oleg.
2017-08-23 14:44 GMT+02:00 Niko Neugebauer <[email protected]>:
… Hi Oleg,
Thank you very much, for the details. If you can, please share here or
send me via email the t-sql script creation for the table and indexes.
Even with the hypothetical indexes I was not able to re-create the
scenario. Are there any exotic settings on this server? Really need more
info to understand the problem.
Best regards,
Niko
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYfy4UAQOUNJZD7nNFH8Nyf71JX6R8rOks5sbB6ogaJpZM4NHe1u>
.
|
Hi Oleg, I did not receive any emails, can you please try sending it again ? Best regards, |
Hi Niko, I've sent email with script. |
Hi Oleg, I tried the script with different additional indexes, but it works just fine. Best regards, |
I also got this error when running cstore_SuggestedTables. The select into #TablesToColumnstore returns 2 rows for some tables with the same partition number, but different row counts? I traced this to the sys.partitions table which contains 2 rows for the same object and partition_number. The tables which return 2 rows have both a clustered and non-clustered index, could that be the reason? |
Need to investigate this ... Need to find some time... |
Hit similar (maybe same) issue (Cannot insert duplicate key in object 'dbo.#TablesToColumnstore'). |
Hey, bumped into exactly the same issue... I think the proposed solution is watertight and I'll create a pull request. @NikoNeugebauer: If you like I can send you the schema of my database. |
I run the procedure dbo.cstore_SuggestedTables on my big database:
Msg 2627, Level 14, State 1, Procedure cstore_SuggestedTables, Line 70 [Batch Start Line 0]
Violation of PRIMARY KEY constraint 'PK__#TablesT__9A619291537632C9'. Cannot insert duplicate key in object 'dbo.#TablesToColumnstore'. The duplicate key value is (215723871).
The statement has been terminated.
The text was updated successfully, but these errors were encountered: