Fixed issue #3002: implemented lazy loading
Improved speed on SQL evaluation
Improved WAL restore message
Minor: fixed speed test case