How to prevent database bottlenecks in smart cities for real-time IoT and citizen services