|Subject||Re: [firebird-support] Re: Why it's soo slow ? it's just a very simple select ...|
>> In the prepare step, roughly explained, the engine parses the SQL text,C'mon. This ain't bad. *g* Ever tried to do the same with the big guns
>> checks the syntax and compiles it into a Firebird native executable form
> Yes this what i understand too, and this why 50 ms seem huge ...
>> 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
> but in the test, i simply do
> isql connect;
> isql select ...
> isql commit;
> and here i see 50 ms :(
Oracle, MSSQL etc.?
>> Optimize your application in a way to keep the most importantI'm afraid, this is only possible (if at all), if your middle-tier is
>> 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
> yes, when i do bulk insert, i alway do with parametized query (and believe it's terrific more faster than without in some case), but for select is not always so evident because i can not keep the prepared statement open (but i will study it to be sure)
> EX: user 1 come and say i want info of obj 1
> few time after user 2 come and say i want the info of obj 98
> i still don't know how to keep the statement prepared between these 2 query done by 2 different users... but i will investigate
somehow caching prepared statements/objects available for being re-used
by different requests, like a connection pool.
>> But, do we drift away from your original problem, where a singleIn one of your previous example, you showed us some timings with ~400ms,
>> execution of your statement on different tables (with/without a longish
>> VARCHAR field) with the same number of records was a magnitude slower?
> yes the original probleme is why in a single execution, the prepare is so much huge with long varchar in the table (not in the select). that still the problem
AFAIR. Now we are down to < 50ms. I'm loosing the context now. ;-)
I'm afraid, we all are a bit lost on what your problem *really* is.
* What is your system actually doing?
* What is your load?
* What Firebird version and architecture do you use?
Thomas Steinmaurer (^TS^)
Firebird Technology Evangelist
Do you care about the future of Firebird? Join the Firebird Foundation: