Subject Re: [firebird-support] Re: Why it's soo slow ? it's just a very simple select ...
Author Thomas Steinmaurer
>> In all three cases you are< 50ms, so what's the problem? Your niggles
>> are in the millisecond area right now. ;-)
>
> oupps, but 50 ms it's ok when you do time to time, but when you have 50 client (and that not too much for a web service) doing this at the same time then the 50 ms become 0.5 secondes .... enalf to make down the services when we know than more than 300000 request (even more?) must be done every days. this is worse when we know that the 50 ms "seem" lost for a simple misc conception (i say "seem" because don't know yet what the prepare do)

In the prepare step, roughly explained, the engine parses the SQL text,
checks the syntax and compiles it into a Firebird native executable form
(BLR).

My guess is that you are assigning the SQL text over and over again,
which leads to re-preparing the statement everytime the SQL statement is
executed. Optimize your application in a way to keep the most important
or most frequently used statements prepared for later reuse. Every tried
to insert e.g. 100000 records in a loop with and without a prepared
statement?

But, do we drift away from your original problem, where a single
execution of your statement on different tables (with/without a longish
VARCHAR field) with the same number of records was a magnitude slower?


--
With regards,
Thomas Steinmaurer (^TS^)
Firebird Technology Evangelist

http://www.upscene.com/

Do you care about the future of Firebird? Join the Firebird Foundation:
http://www.firebirdsql.org/en/firebird-foundation/