python - Most efficient method of querying MYSQL Table -


so have table, in future contain thousands of rows.

the rows contain date , other data need return.

i have array of dates need query original table return appropriate data.

currently have setup whole original table copied array, each date, use loop copy data.

for un in range(0,listc)     in range(0,bigtablec)         if list[un] == bigtable[i][1]             a[un] = bigtable[i][2] 

so above example of how works.

my question whether using multiple select queries on bigtable quicker above method.

so each of "for un in range(0,listc)" query table corresponding date in list array. data single returned row.

appologies if obvious question.

this not solution.

you should try bring data in 1 network round trip rather having 1 per date in list.

you don't how data represents in memory. you'll want careful "copy whole table array".

the efficiency of query combination of explain plan, indexes on table, , how many network round trips need bring back.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -