Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2575

UPDATE STATS sometimes fails on very long varchars

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • sql-cmp
    • None

    Description

      One symptom is observing 6003 or 6004 warnings after UPDATE STATISTICS is done. That is, UPDATE STATISTICS seems to succeed, but when repeated it fails with an error 9200, and 6003 or 6004 warnings. These warnings indicate that the histogram interval values are not in order. In one example that I debugged, the problem was that we used a SELECT statement to compute aggregates on the column, and the plan for that SELECT statement did not sort the results, even though an ORDER BY was specified. While debugging that, I ran into several other issues with sorts on long varchars. Concluding that the engine is simply not up to prime-time for such sorts (and seeing that such sorts are unneeded anyway), I plan to change UPDATE STATISTICS to first truncate the string to a shorter length and then generate the SELECT.

      Attachments

        Issue Links

          Activity

            People

              dbirdsall Dave Birdsall
              dbirdsall Dave Birdsall
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: