usp_AdaptiveIndexDefrag / Error converting data type bigint to numeric

Open
#312 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
sql
Domain
database

Research direction

Start with usp_AdaptiveIndexDefrag and reproduce the statistics-collection path that calls sys.dm_db_stats_properties. Investigate the bigint-to-numeric conversion reported as error 8114, using the provided output and bigint column context. Done means statistics collection completes without the conversion error and defragmentation is no longer left incomplete.

Written by the indexing model from the issue text.

Description

This seems to be happening during collection of statistics, leaving the defragmentation effort incomplete.

   Selecting a statistic to update...
   Getting information on selected statistic...
   Determining modification row counter for statistic [...] on table or view [...] of DB [...]...
     Using sys.dm_db_stats_properties DMF...
     Error 8114 has occurred while determining row modification counter. Message: Error converting data type bigint to numeric. (Line Number: 0)
     Found a row modification counter of 0.000 and 332 rows...
     No need to update statistic [...] on DB [...] and object [...]...

The relevant table has a field of type bigint which seems to be where the conflict is originating from.

Without a fix for this the tool cannot be used efficiently.

Dominant language
Jupyter Notebook
Stars
1.6k
Forks
749
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/tigertoolbox

All issues in microsoft/tigertoolbox

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.