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

UPDATE STATISTICS on wide tables causes a tdm_arkcmp core

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.4
    • sql-cmp
    • None

    Description

      The following script creates a table with 500+ columns. When we attempt UPDATE STATISTICS on all columns, we get a core in tdm_arkcmp.

      drop schema if exists mytest cascade;
      create schema mytest;
      set schema mytest;

      create table mytable (id int, c0 char(10) default null, c1 char(10) default null, c2 char(10) default null, c3 char(10) default null, c4 char(10) default null, c5 char(10) default null, c6 char(10) default null, c7 char(10) default null, c8 char(10) default null, c9 char(10) default null, c10 char(10) default null, c11 char(10) default null, c12 char(10) default null, c13 char(10) default null, c14 char(10) default null, c15 char(10) default null, c16 char(10) default null, c17 char(10) default null, c18 char(10) default null, c19 char(10) default null, c20 char(10) default null, c21 char(10) default null, c22 char(10) default null, c23 char(10) default null, c24 char(10) default null, c25 char(10) default null, c26 char(10) default null, c27 char(10) default null, c28 char(10) default null, c29 char(10) default null, c30 char(10) default null, c31 char(10) default null, c32 char(10) default null, c33 char(10) default null, c34 char(10) default null, c35 char(10) default null, c36 char(10) default null, c37 char(10) default null, c38 char(10) default null, c39 char(10) default null, c40 char(10) default null, c41 char(10) default null, c42 char(10) default null, c43 char(10) default null, c44 char(10) default null, c45 char(10) default null, c46 char(10) default null, c47 char(10) default null, c48 char(10) default null, c49 char(10) default null, c50 char(10) default null, c51 char(10) default null, c52 char(10) default null, c53 char(10) default null, c54 char(10) default null, c55 char(10) default null, c56 char(10) default null, c57 char(10) default null, c58 char(10) default null, c59 char(10) default null, c60 char(10) default null, c61 char(10) default null, c62 char(10) default null, c63 char(10) default null, c64 char(10) default null, c65 char(10) default null, c66 char(10) default null, c67 char(10) default null, c68 char(10) default null, c69 char(10) default null, c70 char(10) default null, c71 char(10) default null, c72 char(10) default null, c73 char(10) default null, c74 char(10) default null, c75 char(10) default null, c76 char(10) default null, c77 char(10) default null, c78 char(10) default null, c79 char(10) default null, c80 char(10) default null, c81 char(10) default null, c82 char(10) default null, c83 char(10) default null, c84 char(10) default null, c85 char(10) default null, c86 char(10) default null, c87 char(10) default null, c88 char(10) default null, c89 char(10) default null, c90 char(10) default null, c91 char(10) default null, c92 char(10) default null, c93 char(10) default null, c94 char(10) default null, c95 char(10) default null, c96 char(10) default null, c97 char(10) default null, c98 char(10) default null, c99 char(10) default null, c100 char(10) default null, c101 char(10) default null, c102 char(10) default null, c103 char(10) default null, c104 char(10) default null, c105 char(10) default null, c106 char(10) default null, c107 char(10) default null, c108 char(10) default null, c109 char(10) default null, c110 char(10) default null, c111 char(10) default null, c112 char(10) default null, c113 char(10) default null, c114 char(10) default null, c115 char(10) default null, c116 char(10) default null, c117 char(10) default null, c118 char(10) default null, c119 char(10) default null, c120 char(10) default null, c121 char(10) default null, c122 char(10) default null, c123 char(10) default null, c124 char(10) default null, c125 char(10) default null, c126 char(10) default null, c127 char(10) default null, c128 char(10) default null, c129 char(10) default null, c130 char(10) default null, c131 char(10) default null, c132 char(10) default null, c133 char(10) default null, c134 char(10) default null, c135 char(10) default null, c136 char(10) default null, c137 char(10) default null, c138 char(10) default null, c139 char(10) default null, c140 char(10) default null, c141 char(10) default null, c142 char(10) default null, c143 char(10) default null, c144 char(10) default null, c145 char(10) default null, c146 char(10) default null, c147 char(10) default null, c148 char(10) default null, c149 char(10) default null, c150 char(10) default null, c151 char(10) default null, c152 char(10) default null, c153 char(10) default null, c154 char(10) default null, c155 char(10) default null, c156 char(10) default null, c157 char(10) default null, c158 char(10) default null, c159 char(10) default null, c160 char(10) default null, c161 char(10) default null, c162 char(10) default null, c163 char(10) default null, c164 char(10) default null, c165 char(10) default null, c166 char(10) default null, c167 char(10) default null, c168 char(10) default null, c169 char(10) default null, c170 char(10) default null, c171 char(10) default null, c172 char(10) default null, c173 char(10) default null, c174 char(10) default null, c175 char(10) default null, c176 char(10) default null, c177 char(10) default null, c178 char(10) default null, c179 char(10) default null, c180 char(10) default null, c181 char(10) default null, c182 char(10) default null, c183 char(10) default null, c184 char(10) default null, c185 char(10) default null, c186 char(10) default null, c187 char(10) default null, c188 char(10) default null, c189 char(10) default null, c190 char(10) default null, c191 char(10) default null, c192 char(10) default null, c193 char(10) default null, c194 char(10) default null, c195 char(10) default null, c196 char(10) default null, c197 char(10) default null, c198 char(10) default null, c199 char(10) default null, c200 char(10) default null, c201 char(10) default null, c202 char(10) default null, c203 char(10) default null, c204 char(10) default null, c205 char(10) default null, c206 char(10) default null, c207 char(10) default null, c208 char(10) default null, c209 char(10) default null, c210 char(10) default null, c211 char(10) default null, c212 char(10) default null, c213 char(10) default null, c214 char(10) default null, c215 char(10) default null, c216 char(10) default null, c217 char(10) default null, c218 char(10) default null, c219 char(10) default null, c220 char(10) default null, c221 char(10) default null, c222 char(10) default null, c223 char(10) default null, c224 char(10) default null, c225 char(10) default null, c226 char(10) default null, c227 char(10) default null, c228 char(10) default null, c229 char(10) default null, c230 char(10) default null, c231 char(10) default null, c232 char(10) default null, c233 char(10) default null, c234 char(10) default null, c235 char(10) default null, c236 char(10) default null, c237 char(10) default null, c238 char(10) default null, c239 char(10) default null, c240 char(10) default null, c241 char(10) default null, c242 char(10) default null, c243 char(10) default null, c244 char(10) default null, c245 char(10) default null, c246 char(10) default null, c247 char(10) default null, c248 char(10) default null, c249 char(10) default null, c250 char(10) default null, c251 char(10) default null, c252 char(10) default null, c253 char(10) default null, c254 char(10) default null, c255 char(10) default null, c256 char(10) default null, c257 char(10) default null, c258 char(10) default null, c259 char(10) default null, c260 char(10) default null, c261 char(10) default null, c262 char(10) default null, c263 char(10) default null, c264 char(10) default null, c265 char(10) default null, c266 char(10) default null, c267 char(10) default null, c268 char(10) default null, c269 char(10) default null, c270 char(10) default null, c271 char(10) default null, c272 char(10) default null, c273 char(10) default null, c274 char(10) default null, c275 char(10) default null, c276 char(10) default null, c277 char(10) default null, c278 char(10) default null, c279 char(10) default null, c280 char(10) default null, c281 char(10) default null, c282 char(10) default null, c283 char(10) default null, c284 char(10) default null, c285 char(10) default null, c286 char(10) default null, c287 char(10) default null, c288 char(10) default null, c289 char(10) default null, c290 char(10) default null, c291 char(10) default null, c292 char(10) default null, c293 char(10) default null, c294 char(10) default null, c295 char(10) default null, c296 char(10) default null, c297 char(10) default null, c298 char(10) default null, c299 char(10) default null, c300 char(10) default null, c301 char(10) default null, c302 char(10) default null, c303 char(10) default null, c304 char(10) default null, c305 char(10) default null, c306 char(10) default null, c307 char(10) default null, c308 char(10) default null, c309 char(10) default null, c310 char(10) default null, c311 char(10) default null, c312 char(10) default null, c313 char(10) default null, c314 char(10) default null, c315 char(10) default null, c316 char(10) default null, c317 char(10) default null, c318 char(10) default null, c319 char(10) default null, c320 char(10) default null, c321 char(10) default null, c322 char(10) default null, c323 char(10) default null, c324 char(10) default null, c325 char(10) default null, c326 char(10) default null, c327 char(10) default null, c328 char(10) default null, c329 char(10) default null, c330 char(10) default null, c331 char(10) default null, c332 char(10) default null, c333 char(10) default null, c334 char(10) default null, c335 char(10) default null, c336 char(10) default null, c337 char(10) default null, c338 char(10) default null, c339 char(10) default null, c340 char(10) default null, c341 char(10) default null, c342 char(10) default null, c343 char(10) default null, c344 char(10) default null, c345 char(10) default null, c346 char(10) default null, c347 char(10) default null, c348 char(10) default null, c349 char(10) default null, c350 char(10) default null, c351 char(10) default null, c352 char(10) default null, c353 char(10) default null, c354 char(10) default null, c355 char(10) default null, c356 char(10) default null, c357 char(10) default null, c358 char(10) default null, c359 char(10) default null, c360 char(10) default null, c361 char(10) default null, c362 char(10) default null, c363 char(10) default null, c364 char(10) default null, c365 char(10) default null, c366 char(10) default null, c367 char(10) default null, c368 char(10) default null, c369 char(10) default null, c370 char(10) default null, c371 char(10) default null, c372 char(10) default null, c373 char(10) default null, c374 char(10) default null, c375 char(10) default null, c376 char(10) default null, c377 char(10) default null, c378 char(10) default null, c379 char(10) default null, c380 char(10) default null, c381 char(10) default null, c382 char(10) default null, c383 char(10) default null, c384 char(10) default null, c385 char(10) default null, c386 char(10) default null, c387 char(10) default null, c388 char(10) default null, c389 char(10) default null, c390 char(10) default null, c391 char(10) default null, c392 char(10) default null, c393 char(10) default null, c394 char(10) default null, c395 char(10) default null, c396 char(10) default null, c397 char(10) default null, c398 char(10) default null, c399 char(10) default null, c400 char(10) default null, c401 char(10) default null, c402 char(10) default null, c403 char(10) default null, c404 char(10) default null, c405 char(10) default null, c406 char(10) default null, c407 char(10) default null, c408 char(10) default null, c409 char(10) default null, c410 char(10) default null, c411 char(10) default null, c412 char(10) default null, c413 char(10) default null, c414 char(10) default null, c415 char(10) default null, c416 char(10) default null, c417 char(10) default null, c418 char(10) default null, c419 char(10) default null, c420 char(10) default null, c421 char(10) default null, c422 char(10) default null, c423 char(10) default null, c424 char(10) default null, c425 char(10) default null, c426 char(10) default null, c427 char(10) default null, c428 char(10) default null, c429 char(10) default null, c430 char(10) default null, c431 char(10) default null, c432 char(10) default null, c433 char(10) default null, c434 char(10) default null, c435 char(10) default null, c436 char(10) default null, c437 char(10) default null, c438 char(10) default null, c439 char(10) default null, c440 char(10) default null, c441 char(10) default null, c442 char(10) default null, c443 char(10) default null, c444 char(10) default null, c445 char(10) default null, c446 char(10) default null, c447 char(10) default null, c448 char(10) default null, c449 char(10) default null, c450 char(10) default null, c451 char(10) default null, c452 char(10) default null, c453 char(10) default null, c454 char(10) default null, c455 char(10) default null, c456 char(10) default null, c457 char(10) default null, c458 char(10) default null, c459 char(10) default null, c460 char(10) default null, c461 char(10) default null, c462 char(10) default null, c463 char(10) default null, c464 char(10) default null, c465 char(10) default null, c466 char(10) default null, c467 char(10) default null, c468 char(10) default null, c469 char(10) default null, c470 char(10) default null, c471 char(10) default null, c472 char(10) default null, c473 char(10) default null, c474 char(10) default null, c475 char(10) default null, c476 char(10) default null, c477 char(10) default null, c478 char(10) default null, c479 char(10) default null, c480 char(10) default null, c481 char(10) default null, c482 char(10) default null, c483 char(10) default null, c484 char(10) default null, c485 char(10) default null, c486 char(10) default null, c487 char(10) default null, c488 char(10) default null, c489 char(10) default null, c490 char(10) default null, c491 char(10) default null, c492 char(10) default null, c493 char(10) default null, c494 char(10) default null, c495 char(10) default null, c496 char(10) default null, c497 char(10) default null, c498 char(10) default null, c499 char(10) default null);

      insert into mytable(id) values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
      select count from mytable;

      update statistics for table mytable on (c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46, c47, c48, c49, c50, c51, c52, c53, c54, c55, c56, c57, c58, c59, c60, c61, c62, c63, c64, c65, c66, c67, c68, c69, c70, c71, c72, c73, c74, c75, c76, c77, c78, c79, c80, c81, c82, c83, c84, c85, c86, c87, c88, c89, c90, c91, c92, c93, c94, c95, c96, c97, c98, c99, c100, c101, c102, c103, c104, c105, c106, c107, c108, c109, c110, c111, c112, c113, c114, c115, c116, c117, c118, c119, c120, c121, c122, c123, c124, c125, c126, c127, c128, c129, c130, c131, c132, c133, c134, c135, c136, c137, c138, c139, c140, c141, c142, c143, c144, c145, c146, c147, c148, c149, c150, c151, c152, c153, c154, c155, c156, c157, c158, c159, c160, c161, c162, c163, c164, c165, c166, c167, c168, c169, c170, c171, c172, c173, c174, c175, c176, c177, c178, c179, c180, c181, c182, c183, c184, c185, c186, c187, c188, c189, c190, c191, c192, c193, c194, c195, c196, c197, c198, c199, c200, c201, c202, c203, c204, c205, c206, c207, c208, c209, c210, c211, c212, c213, c214, c215, c216, c217, c218, c219, c220, c221, c222, c223, c224, c225, c226, c227, c228, c229, c230, c231, c232, c233, c234, c235, c236, c237, c238, c239, c240, c241, c242, c243, c244, c245, c246, c247, c248, c249, c250, c251, c252, c253, c254, c255, c256, c257, c258, c259, c260, c261, c262, c263, c264, c265, c266, c267, c268, c269, c270, c271, c272, c273, c274, c275, c276, c277, c278, c279, c280, c281, c282, c283, c284, c285, c286, c287, c288, c289, c290, c291, c292, c293, c294, c295, c296, c297, c298, c299, c300, c301, c302, c303, c304, c305, c306, c307, c308, c309, c310, c311, c312, c313, c314, c315, c316, c317, c318, c319, c320, c321, c322, c323, c324, c325, c326, c327, c328, c329, c330, c331, c332, c333, c334, c335, c336, c337, c338, c339, c340, c341, c342, c343, c344, c345, c346, c347, c348, c349, c350, c351, c352, c353, c354, c355, c356, c357, c358, c359, c360, c361, c362, c363, c364, c365, c366, c367, c368, c369, c370, c371, c372, c373, c374, c375, c376, c377, c378, c379, c380, c381, c382, c383, c384, c385, c386, c387, c388, c389, c390, c391, c392, c393, c394, c395, c396, c397, c398, c399, c400, c401, c402, c403, c404, c405, c406, c407, c408, c409, c410, c411, c412, c413, c414, c415, c416, c417, c418, c419, c420, c421, c422, c423, c424, c425, c426, c427, c428, c429, c430, c431, c432, c433, c434, c435, c436, c437, c438, c439, c440, c441, c442, c443, c444, c445, c446, c447, c448, c449, c450, c451, c452, c453, c454, c455, c456, c457, c458, c459, c460, c461, c462, c463, c464, c465, c466, c467, c468, c469, c470, c471, c472, c473, c474, c475, c476, c477, c478, c479, c480, c481, c482, c483, c484, c485, c486, c487, c488, c489, c490, c491, c492, c493, c494, c495, c496, c497, c498, c499) sample random 10 percent;

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 40m
                  2h 40m