Subject Re: [ib-support] insert in Firebird
Author C R Zamana
Leyne, Sean wrote:
>>-----Original Message-----
>>From: C R Zamana [mailto:zamana@...]
>>Sent: Tuesday, August 28, 2001 4:36 PM
>>
>
>
>
>>>How many records are you processing?
>>>
>> Exactly 3813.
>>
>
> Even with committing after each insert, you should be seeing performance
> on the order of 10 records a second. By committing at the end of the
> batch, you should be able to get performance on the order on 1000 rows
> per second.
>
> What is the length of the records?
>


515 bytes.




>
>
>>>What tools are you using to connect to the database? (i.e.
>>>
>>ODBC, IBX,
>>
>>>IBO or API?)
>>>
>> API ( ESQL/C ).
>>
>
> Check that you are preparing an INSERT statement, and then simply
> assigning parameters for each row inside a loop. You are probably
> having the server recompile each statements, this would explain a
> lot of your performance problems.

No, there is no preparation. The question is that the
application was linked with a library that was made to be
very generic.

Each operation is independent of the others.

I know that this is not the best approach for a batch process. But the
question is that this same "approach" works very well with Oracle,
without any tunning.


>
>
>
>>>What indexes are defined for the table?
>>>
>> None.
>>
>
> Not even a primary key or foreign key? I find that a
> little surprising (not impossible though)
>
> What about triggers?


No, sorry. Yes, there is a primary key. And this primary
key is maintained by a generator. So, there is a trigger that maintain
this key after each insert.


>
>
>
>>>What is the database cache setting?
>>>
>> I don't know how to check this. However a "show database"
>>give me the following:
>>
>
> This value is set in the IBConfig/ISCConfig file.

#V4_LOCK_MEM_SIZE
98304
#ANY_LOCK_MEM_SIZE
98304
#V4_LOCK_SEM_COUNT
32
#ANY_LOCK_SEM_COUNT
32
#V4_LOCK_SIGNAL
16
#ANY_LOCK_SIGNAL
16
#V4_EVENT_MEM_SIZE
32768
#ANY_EVENT_MEM_SIZE
32768
>
>
>
>>PAGE_SIZE 4096
>>Number of DB pages allocated: 4441
>>Sweep interval = 20000
>>
>
> A couple of other questions I had forgotten to ask:
>
> - What OS is the server running on?
>
> - What type of CPU/how much RAM?
>
> - Are you running Classic or Superserver?


This was informed in the original message.
Linux, RedHat 6.2, AMD Athlon 1Ghz, 128RAM, SuperServer
( FireBird 1.0.0-0aBeta2 ).

>
> - Is your import routine running on the server or on a remote station?
> If remote, what network protocol are you using?

Is running on the server.

Thank you.
Best regards.
--
------------------------------------------------------------------------
zamana@... | "Emacs is a nice OS - but it lacks a good text
zamana@... | editor. That's why I'm using Vim. Anonymous
http://www.inso.com.br | http://www.vim.org/quotes.html
------------------------------------------------------------------------