[fix bug 907938] DB optimizations in voting app.
Merge pull request #474 from akatsoulas/907938

[fix bug 907938] DB optimizations in voting app.