I'm updating a database, at the moment it's adding around 5 thousand rows every second or two up to around 2 million rows - this is testing from a new table. When I'm trying to view sections of this data within my app it's taking 30+ seconds to load the data.
Is this due to web workers? i.e. should I be adding more to my account?
I'm not a professional developer but my table is fairly simple.. only 9 columns.
My query is...
def get_profile_info(self, profile):
try:
self.cursor.execute('''select keyword, landing_page,
position, impressions, clicks, ctr
from search_data where profile_id={}'''.format(profile))
return self.cursor.fetchall()
except:
pass
finally:
self.db.close()
I've added an index to the profile_id column - anything obvious I'm doing wrong or is it a web working thing?
Any help is much appreciated.