Timeline for Why do the queries slow down after a few minutes, when trying to build a DB?
Current License: CC BY-SA 3.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 2, 2017 at 1:08 | comment | added | joanolo |
I would suggest you time every cur.execute and see if the slowness is due to the database, or if it's got something in your loops going O(n^2). Also, you could make your code much simpler by just moving everything to a single MySQL (unnormalized) table, and once everything is transferred to MySQL do the transformations there, and create the normalized tables, using SQL.
|
|
Jul 2, 2017 at 1:05 | comment | added | joanolo |
The code you show, as written, doesn't make much sense... you would be creating tables with statements like CREATE TABLE x (INSERT bla...) . I think that, while simplifying the original, something went amiss.
|
|
Jul 2, 2017 at 0:45 | answer | added | Allen King | timeline score: 0 | |
Jul 1, 2017 at 22:22 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
May 24, 2017 at 18:55 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Apr 16, 2017 at 15:41 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Mar 5, 2017 at 0:21 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Feb 1, 2017 at 5:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Dec 28, 2016 at 22:36 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Nov 20, 2016 at 3:49 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Oct 4, 2016 at 3:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 25, 2016 at 16:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jul 21, 2016 at 17:18 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jun 21, 2016 at 7:24 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
May 20, 2016 at 14:30 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jul 7, 2015 at 17:20 | comment | added | Rick James | I don't know the Python connector, but everywhere else, you don't use a "cursor" for all the statements, only the "connection". | |
Jul 7, 2015 at 15:26 | comment | added | Lennart - Slava Ukraini |
Probably not what is causing you the most pain, but since you are concatenating the parameters into the queries the queries has to be recompiled for each statement. Try using prepared statements instead: theSList.append('?')
|
|
Jul 7, 2015 at 15:03 | answer | added | Jehad Keriaki | timeline score: 2 | |
Jul 7, 2015 at 13:36 | review | First posts | |||
Jul 7, 2015 at 14:02 | |||||
Jul 7, 2015 at 13:35 | history | asked | lukehawk | CC BY-SA 3.0 |