Subject Re: unable to create index on .dbf having 30 fields and 100000
From Mervyn Bick <invalid@invalid.invalid>
Date Wed, 1 Sep 2021 22:12:08 +0200
Newsgroups dbase.getting-started

On 2021/09/01 19:25, Miloind Nighojkar wrote:
> Scenerio
> Trying to create a index on .dbf file having more than 100000 records.
> index key is having two fields.
> Command iisued is index on ....to ...index file name...
> observation is it hangs.

The command you are using is for creating .ndx files as used with dBASE
III.

100000 records shouldn't be a problem.  I've just created a .ndx index
file on two fields for a table with more than 1680000 records.  It  took
a while and dBASE was unresponsive while this was happening.  How long
did you wait before deciding that dBASE was hanging?

What index expression did you use and what size are the two fields in
the table?  Keep in mind that the maximum length of the index key is 100
characters.

If you are using a newer version of dBASE you should be using the
following command.

use tablename exclusive
index on .... tag tagname

This will create the index in a .mdx file with the same name as the
table.  This works faster than creating a .ndx fle and it also uses
quite a lot less disk space.  You can have up to 47 tags in a .mdx file
and they are all kept up to date if any key field is changed even if the
tag isn't active.  With .ndx files you need to update each file manually.

> when same file is used for recodrs say around 20000 it works...
>

You may just have been a bit too impatient with the longer file. :-)

> any suggestions..?
>
> Any changes expected in .ini file

No.

Mervyn.