Improved performance in indexedDB query