A fix is available
APAR status
Closed as program error.
Error description
SQLCODE -904 when offloading query to IDAA if GROUP BY clause items are different from SELECT list. For example: SELECT DISTINCT 3 + (C1 + C3SINT), C0 || ' ', COUNT(*) FROM T1 WHERE C2=1 GROUP BY (C1 + C3SINT)+3, C0 || ' ' ORDER BY 2 DESC, 1, 3 DESC; (d159326) IDAAV2R1/K
Local fix
n/a
Problem summary
**************************************************************** * USERS AFFECTED: All users of DB2 9 for z/OS EXPLAIN. * * All users of DB2 9 for z/OS who are also * * using IDAA ( IBM DB2 Analytics Accelerator ) * **************************************************************** * PROBLEM DESCRIPTION: (1) Query offload to an accelerator * * fails when a GROUP BY expression does * * not match the corresponding SELECT list * * expression. * * * * (2) Explain table DSN_QUERYINFO_TABLE * * is populated for static SQL and also * * when ACCEL=NO for both static and * * dynamic SQL. * * * * (3) Query offload to an accelerator * * fails when there are multiple views * * in a complex query. * **************************************************************** * RECOMMENDATION: * **************************************************************** (1) Query offload to an accelerator fails with SQLCODE -904 when a GROUP BY expression does not match the corresponding SELECT list expression. For example: SELECT 3+(C1+C2),C4 FROM T1 WHERE C3 >1 GROUP BY (C1+C2)+3,C4 ORDER BY 2,1; (2) Explain table DSN_QUERYINFO_TABLE is populated for static SQL and also when ACCEL=NO for both static and dynamic SQL. DB2 should not populate DSN_QUERYINFO_TABLE for these two scenarios since the queries will never offload to an accelerator. (3) Query offload to an accelerator fails with SQLCODE -901 when for a complex query with multiple views. Additional keywords: SQLEXPLAIN SQLCODE904 IDAAV2R1/K SQLGROUPBY SQLCODE901 SQLVIEW
Problem conclusion
(1) The converted query text used for offload is fixed so that the GROUP BY expression matches the SELECT list expression. (2) DB2 no longer populates DSN_QUERYINFO_TABLE for static SQL or when ACCEL=NO for both static and dynamic SQL. (3) The converted query text used for offload is fixed so that the complex query with multiple views executes successfully.
Temporary fix
Comments
APAR Information
APAR number
PM66388
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
910
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2012-06-07
Closed date
2012-08-03
Last modified date
2012-09-05
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK80822
Modules/Macros
DSNXONZC DSNXOOP
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
R910 PSY UK80822
UP12/08/21 P F208
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
05 September 2012