|
|
463634 |
|
Adaptive Server Enterprise |
|
dataserver |
|
|
Closed |
|
AIX 5.1 |
|
15.0.1 ESD#2 |
|
|
|
|
|
|
|
|
|
04 Jun 2007 |
Fixed |
|
|
|
12 Jun 2007 |
Fixed |
|
|
|
|
|
Error 325, "Adaptive Server finds no legal query plan for this statement. ..." when executing a union all with more than 8 union sides in serial. |
|
Workaround Description |
|
For this specific query, an AP can be used to force a plan.
select datalength(Stream), Stream, ID from MyTable where ID in (3303,3456,3457,
3458,3459,3460,3461,3666,3829,3939,4006,4023,4249,4273,4368,4400,4498,4552,4674,
4811,7621,8338,9219,9437,9809,9855,9878,9952,9959,10303,10919,10923,10943,10948,
10958,10968,10982,11104,11302,11527,11583,11949,12086,12166,12400,12543,12580,
18405,18413,18421,18543,18593,18723,18922,19100,19436,19520,19744,19887,19932,
19978
,20349,21735,21774)
union all
select datalength(Stream), Stream, ID from MyTable
where ID in (22175,22451,22452,22553,22555,22579,22580,22738,23710,23768,23793,
23797,23833,23851,23859,23879,23942,26072,26094,26336,28252,28575,28626,28639,
28725,28862,28863,28874,28892,29068,29322,29347,29362,29556,29558,29573,30000,
30253,30410,30511,30520,30719,30781,30861,31488,31782,32287,32535,32717,32733,32754,
32764,32863,33913,34013,34014,34072,34126,34195,34224,34243,34255,34286,34391)
union all
select datalength(Stream), Stream, ID from MyTable where ID in (34432,
34599,34606,34622,34886,34956,34986,34991,35069,35276,35418,35448,35707,35813,
35918,36019,36522,36561,36582,36747,36751,36782,36791,36844,36846,36848,36876,
36877
,36884,36885,36886,36891,36901,36905,36918,36922,36924,36939,36949,36952,37023,
37044,37045,37048,37051,37056,37058,37059,37064,37068,37069,37072,37078,37084,
37085,37087,37096,37106,37107,37109,37111,37114,37118,37119)
union all
select datalength(Stream), Stream, ID from MyTable where ID in (37121,37122,37124,37126,
37127,37132,37133,37134,37166,
37167,37168,37169,37171,37172,37173,37179,37180,37182,
37183,37184,37185,37186,37188,37189,37193,37194,37195,37196,37197,37198,37199,
37208,37263,37264,37265,37266,37267,37268,37274,37275,37276,37278,37279,37280,
37281,37282,37283,37284,37285,37286,37287,37292,37293,37294,37308,37330,37333,37355,
37357,37363,37417,37426,37428,37430)
union all
select datalength(Stream), Stream
, ID from MyTable where ID in (37431,37434,37435,37436,37450,37451,37455,37460,
37591,37749,37750,37752,37754,37755,37756,37757,37760,37763,37767,37799,37806,
37807,37826,37837,37839,37849,37850,37851,37854,37863,37963,38111,38173,38175,38288
,38342,38358,38386,38426,38475,38566,38636,38637,38648,38735,38739,38803,38960,
39396,39502,39683,39790,39793,39895,39938,39965,40042,40292,40300,40642,40716,
40737,40927,40928)
union all
select datalength(Stream), Stream, ID from MyTable where ID in (41045,41071,41104,49542,49704,49825,49853,49980,50021,50082,50113,
50142,50195,50425,50484,50494,50501,50521,50523,50721,50725,50735,50748,50767,50769,
50774,50825,50838,50876,50893,50917,50918,51038,51049,51089,51153,51197,51233,
51301,51327,51329,51426,51599,51685,51694,51790,51791,51793,51844,51846,51851,
51865,51920,51939,51941,51960,52013,52015,52123,52184,52210,52213,52243,52245)
union all
select datalength(Stream), Stream, ID from MyTable where ID in (53294,53296
,53661,53677,53737,53796,53934,54188,54639,54695,54900,54918,54972,54973,55067,
55071,55101,55172,55385,55386,55387,55389,55568,55632,55642,55653,55676,55945,
55968,55979,55981,56129,56138,56139,56173,56201,56278,56370,56387,56389,56519,
56537
,56551,56620,56660,56721,56899,56928,56963,56986,57105,57139,57211,57422,57432,
57740,58028,58196,58244,58296,58742,59340,59354,59392)
union all
select datalength(Stream), Stream, ID from MyTable where ID in (59399,59402,
59404,59406,59419,
59763,59879,59906,59908,59913,59914,59948,59955,59965,60053,60103,60152,60210,
61197,61545,61610,61637,61836,61838,61978,62163,62258,62260,62264,62267,62271,
62273,
62276,62277,62285,62287,62289,62491,62633,62769,62857,62946,63023,63060,63094,
63105,63144,63213,63214,63274,63275,63360,63371,63377,63382,63383,63385,63726,
63834,63841,63871,63998,64018,64032)
union all
select datalength(Stream), Stream, ID
from MyTable where ID in (64052,64158,64160,64162,64210,64509,64555,65677,65750
,65810,65816,65820,65838,66003,66014,66099,66225,66248,66264,67491,67497,67550,
67558,67621,67631,67856,68128,68129,68134,68323,68436,68439,68445,68773,68965,
69209,69222,69237,69253,69259,69392,69494,69573,69575,69679,69855,70286,70783,
70907
,71128,71841,71849,71852,71862,71866,71870,71875,71878,71890,71902,71908,71910,
71925,71926)
plan "
( union_all
( nl_join ( t_scan MyTable@Gtt1 ) ( values ) )
( nl_join ( t_scan MyTable@Gtt3 ) ( values ) )
( nl_join ( t_scan MyTable@Gtt5 ) ( values ) )
( nl_join ( t_scan MyTable@Gtt7 ) ( values ) )
( nl_join ( t_scan MyTable@Gtt9 ) ( values ) )
( nl_join ( t_scan MyTable@Gtt11 ) ( values ) )
( nl_join ( t_scan MyTable@Gtt13 ) ( values ) )
( nl_join ( t_scan MyTable@Gtt15 ) ( values ) )
( nl_join ( t_scan MyTable@Gtt17 ) ( values ) )
) ( prop MyTable@Gtt1 ( parallel 1 ) ( prefetch 2 ) ( lru ) )
( prop MyTable@Gtt3 ( parallel 1) ( prefetch 2 ) ( lru ) )
( prop MyTable@Gtt5 ( parallel 1 ) ( prefetch 2 ) ( lru ) )
( prop MyTable@Gtt7 ( parallel 1 ) ( prefetch 2 ) ( lru ) )
( prop MyTable@Gtt9 ( parallel 1 ) ( prefetch 2 ) ( lru ) )
( prop MyTable@Gtt11 ( parallel 1 ) ( prefetch 2 ) ( lru ) )
( prop MyTable@Gtt13 ( parallel 1 ) ( prefetch 2 ) ( lru ) )
( prop MyTable@Gtt15 ( parallel 1 ) ( prefetch 2) ( lru ) )
( prop MyTable@Gtt17 ( parallel 1 ) ( prefetch 2 ) ( lru ) )
"
go |
|
|
|