Too slow to read an entire table from Microsoft Access
fumanchu
fumanchu at amor.org
Wed Mar 14 23:25:23 EDT 2007
On Mar 14, 7:34 pm, lialie <lia... at gmail.com> wrote:
> I read a table with 4500 rows and 12 columns using win32com.client.
> Reading and updating records are OK, but cost too much time.Especially
> making a dict as line(***).
> All follows done may take nearly 90s!
> Is there any good idea? Thanks.
Yeah:
1. Don't use MoveFirst/MoveNext to read. Use GetRows. It's about 60%
faster (on average) in my experience:
http://projects.amor.org/dejavu/browser/trunk/storage/storeado.py?rev=335#l593
2. Unwind as much of each win32com call as you can, and try to call
InvokeTypes directly. That'll save you another big chunk. See
http://projects.amor.org/dejavu/browser/branches/1.5/storage/storeado.py#l700
Robert Brewer
System Architect
Amor Ministries
fumanchu at amor.org
More information about the Python-list
mailing list