speedup in case of keyed  tables