Slow indexing of DBF database

122 views
Skip to first unread message

Greg Stachowski

unread,
Jul 8, 2015, 3:54:00 PM7/8/15
to python...@googlegroups.com
Hi,

I have a database of 215,000 records. The legacy Clipper for DOS application indexes it in a couple of seconds. Python with dbf takes about 45 seconds suing create_index. Is there any way to speed this up?

Regards

Greg

Ethan Furman

unread,
Jul 8, 2015, 3:57:05 PM7/8/15
to python...@googlegroups.com
On 07/08/2015 12:47 PM, Greg Stachowski wrote:

> I have a database of 215,000 records. The legacy Clipper for DOS application indexes it in a couple of seconds. Python with dbf takes about 45 seconds suing create_index. Is there any way to speed this up?

How many fields are you using?

What types are they?

What does your index expression look like?

--
~Ethan~

Greg Stachowski

unread,
Jul 8, 2015, 4:48:12 PM7/8/15
to python...@googlegroups.com


On Wednesday, 8 July 2015 21:57:05 UTC+2, Ethan Furman wrote:

How many fields are you using?

What types are they?

What does your index expression look like?

- indexing over 2 fields

- both strings (5 and 3 characters long)

- g.create_index(lambda rec: (rec.a, rec.b))

--
Greg

Ethan Furman

unread,
Jul 8, 2015, 4:49:59 PM7/8/15
to python...@googlegroups.com
The only hope you have of a faster index is using a newer version (assuming you are using an older one).

Adding .idx files is in the works, but it's not done yet.

--
~Ethan~

Greg Stachowski

unread,
Jul 8, 2015, 4:59:32 PM7/8/15
to python...@googlegroups.com
I'm using 0.96.003.

Ok. It's not too much of an issue. It affects startup time, but I can live with that. Once the index is done the rest is pretty quick. Thanks for the quick response and the work you've done on dbf.

Greg


Reply all
Reply to author
Forward
0 new messages