in reply to How to make my DBD::CSV DB code faster.
This does only three physical file searches (one for each table) whereas your loop would do twice as many physical file searches as there are rows in the sec table (it would have to search each of the other tables for each row in sec). Please let me know if it improves your time and accomplishes what you want to accomplish$dbh->do(" CREATE TABLE trafficstats AS SELECT key, sec.id, sec.hid, name,state,ccs,kbps,mbytes FROM sec,bt,stats WHERE sec.id = bt.id AND sec.hid = bt.hid AND sec.id = stats.id AND sec.hid = stats.hid AND sec.instance = stats.instance ");
|
|---|