Davide Alberani wrote: > May be you can gain some (a lot?) of speed using transactions; you > can try the imdbpy2sql.py option "--sqlite-transactions": it was > thought for SQLite (and will issue a warning if used with another > server, but ignore it).
I tried it but there is no SQL command "BEGIN TRANSACTION" in DB2. The DB2 equivalent is called "BEGIN COMPOUND" -- but it seems it is used in a different way; just replacing this in your code is not enough. Have you thought of using SQLAlchemy's Session feature? This seems to be a wrapper around the database's transactional features. > IMDbPY's solution? Using SQLAlchemy, some TEXT columns (the ones > which require an index) are VARCHAR(255) - and so the indexes are > created and everybody is happy. > Sort of: there are very few cases (at this time, 3 - THREE - in the whole > database, and they are all person's "names") in which the data is > too long. Hm, why is it truncated to VARCHAR(255)? I made a quick check on some databases supported by SQLAlchemy and it seems like they do not have any problems with larger values than 255 in their current versions. I would like to try a larger value. Before I wait another 8 hours: Do you know what VARCHAR size is needed to store all these names? > PS for Joachim: I really appreciate your valuable help, but as you > can imagine, the problem is becoming more and more academic. :-) Indeed, it becomes really special now. But I still have the feeling that we are close to a solution. And: I also would like to thank your for your time spent on fixing this issue. It's good to see someone cares about. > In the sense: actually the solution _for you_ is to use another > database server (maybe you can migrate the data, later, to DB2). > Honestly, ibm_db seems too immature, and IMDbPY have a lot of > rough edges by itself (as you've seen). This was exactly I was doing until IMDbPY supported SQLAlchemy. Since DB2 cannot be used directly (I have no choice, this is our database system; and it's actually quite good) I first ran IMDbPY on the MySQL database and then migrated all data into DB2. It worked but was quite annoying. Thanks, Joachim -- M. Sc. Joachim Selke Technische Universität Braunschweig, Institut für Informationssysteme Mühlenpfordtstraße 23, 38106 Braunschweig, Germany <http://www.l3s.uni-hannover.de/~selke> ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Imdbpy-devel mailing list Imdbpy-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-devel