Cache prepared statements in OC_DB

Cache prepared statements not involving $limit or $offset

Gives a significant performance increase for database intensive tasks such as filecache scanning and upgrading