speedup in case of keyed  tables
Merge pull request #129 from michele-comitini/select_speedup1

speedup in case of keyed  tables