Subject Re: [ib-support] %100 CPU usage with interbase, is it usual?
Author David K. Trudgett
On Friday 2001-12-28 at 17:53:13 +0200, KURSAT TASKIN wrote:

> Is this a program that you wrote ?
> If so, what are you using for database access ?
> How many tables does the import data occupy ?
> Kursat: I have only one table, 3 field, and 1.000.000 record txt file, I
> read data from txt file with a while loop using IBODatabase, IBOQuery,
> IB_Script, first delete all the record, and then read the data one by one.
> insert into GDB and then post. thats all. PIII 650 my computer is, 192 RAM,
> WinNT

Kursat, you're making people guess too much. It is only in this
message (your third or fourth post?) that we find out indirectly that
you are using Delphi to do the work (because you are using IBObjects
on WinNT). You tell us here that you are using three fields, but don't
mention what size or type. You don't tell us what you are using
IB_Script for (and it seems entirely unnecessary). You tell us that it
uses 100% CPU, but don't tell us for how long. And so on...

It seems to me, though, that if you want to load a million rows into
your database, and you want it to do it fast, then you should convert
your text file into fixed length format and import it using
InterBase's external file capabilities. You can use Perl to do that
conversion to fixed length for you in about 5 minutes (which includes
writing the script). There's also no reason to use Delphi to do the
actual importing. All you need probably is ISQL and an import script.

As for not being able to do anything else while the CPU is at 100%,
that's your operating system's fault. I have machines that are often
at 100% CPU, and it doesn't stop me doing other things with them. This
is because I use Linux and not NT. SCSI disks instead of IDE disks
also help with effective multitasking if your system is doing a lot of
disk I/O.

David Trudgett