[#136] Fix DB query regression

* Fix column indexes in 'filtered' records retrieval.
* Remove unused code