Hi Siva Siva Sai wrote: > > I have a file (about 3-4 MB ) with about 20000 records > in it. I need to create an index on a particular field > (integer) in each record. But there might be multiple > records matching a particular field value. My queries > are something like, > "Get all records with the A < field value < B" > > This looks like an ideal candidate for a DBMS solution > like MySQL but I do not have it. Is there any way I > could do this efficiently in Perl. Will the DB_File > module be usefull( I know very little about this ).
Do you know SQL? If you can easily separate the fields from each record and write them into a database, then that's the way to go. Perl (using the DBI and DBD::mysql modules) will help you create and access a new MySQL database table based on the contents of your file. But that's not the way to go if the file is modified frequently as rebuilding the table will take several seconds. Tell us more of your problem if you need anything further. I hope this helps. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
