9.2 fp4a AIX
OK So I have some ludicrously long, complex and unsurprisingly poorly performing reporting SQLs I'm trying to (unsuccessfully) tune and I'm getting the old SQL0437W Performance of this complex query may be sub-optimal. Reason code: "1".
I've increased the STMTHEAP to a whopping 163920*4k pages and reduced the Query Opt to 2.
One of the statements is 1000 lines long with lots of CASE and sub-SELECTS etc. but I would have thought a 60MB Statement Heap should cover it, or am I mistaken?
Any ideas?