Hello,
I must correct myself. Within the same transaction SQLColumns is being called before SQLPrimaryKeys. So it's most likely this function that does not work correctly. After SQLPrimaryKeys function SQLStatistics is being called.
Best regards,
Peter