Subject SELECT limitation with UNION/GROUP BY
Author Darryl
Hi,

I am trying to run a SELECT statement that UNIONS a number of reasonably
complex VIEWS. This causes a nasty error that crashes the FB server (I just
updated from 1.03 to 1.5 RC5 in the vain hope that this would go away.)

The error I am getting is "Unsuccessful execution caused by a system error
that precludes successful execution of subsequent statements.
internal gds software consistency check (missing pointer page in
DPM_data_pages (243))."

Does this mean anything to anybody?

I believe that this is a system limitation as I can run the SELECT with any
8 of the 9 UNIONs.

The SELECT statement that fails is:

select ENTITY_ID, SIZE_GROUP_ID, PRODUCT_STYLE_ID, COLOUR_ID,
TRANSACTION_DATE,
SIZE_1, SIZE_2, SIZE_3, SIZE_4, SIZE_5, SIZE_6, SIZE_7, SIZE_8, SIZE_9
from COUNT_STOCK_BY_SIZE_1
UNION
....... < 9 SELECT statements in total >

The view COUNT_STOCK_BY_SIZE_1 is a 5 UNIONed SELECT statement with the
structure:

select cast((store_ID * 100) + 2 as INTEGER) as ENTITY_ID, SIZE_GROUP_ID,
p.PRODUCT_STYLE_ID,
COLOUR_ID, TRANSACTION_DATE,
sum(QUANTITY) as size_1, sum(0) as size_2, sum(0) as size_3, sum(0) as
size_4, sum(0) as size_5,
sum(0) as size_6, sum(0) as size_7, sum(0) as size_8, sum(0) as size_9
from sales S, products P, product_styles PS
where S.product_id = P.product_id AND
P.product_style_id = PS.product_style_id AND
SIZE_ID in (1, 7, 13, 15, 23, 24, 29)
GROUP BY store_ID, SIZE_GROUP_ID, P.PRODUCT_STYLE_ID, COLOUR_ID,
TRANSACTION_DATE
UNION
.....

Any help on this would be appreciated.

Regards,

Darryl