1. Basically PPA compares Explain SQL by matching the STMTNO. Obviously it tries to do exact matching first, then if that fails it does a 'proximity' check and looks up & down the chain of stmts looking for a similarly structured statemen within the general proximity of the original. But essentially everything start with the 2 lists (before & after) sorted by stmt number, and so the comparison works best if the ordering of the sql within the program remains unchanged
2- No, PPA does not take advantage of the QUERYNO when doing a compare.