On other databases (same structure, same plan produced) on the same
server (different data of course) it works fine. Backup & restore didn't
help. I can provide the database, but given it's a customer data it
needs to be handled as private data.
The minimum query I can replicate it looks like this:
as (select distinct(DR.F_DA_DATE)
from T_DAILY_RAW DR
from T_EMAILS_WEBDB_RAW EWR
inner join DAYS DR on DR.F_DA_DATE = EWR.F_EWR_SENT
inner join T_EMAIL_TYPE_DIM EMTD on EMTD.F_EMT_VALUE = EWR.F_EWR_TYPE;
And the plan is "PLAN HASH (EMTD NATURAL, JOIN (SORT (DR DR NATURAL), EWR INDEX(IDX_EWR_SENT_A_TEMP)))".
summary: block size exceeds implementation restriction at JStatement::openCursor => Error "block size exceeds implementation restriction" while inner joining large datasets with a long key using the HASH JOIN plan