Subject Re: [firebird-support] Question about few Firebird details
Author livius
Hi,
 
thanks you and others for correction
now “44” i am near to understand.
 
45. i must test – but how look sort for your sample?
ORDER BY T1.iSort
and difference is because of existence of big varchar - BIGSTARTING ?
If yes then something must be wrong – this sould only sort pointers and inrelevant data should not affect speed.
But i do not know how this work internally – did you compare this with others RDBMS?
 
regards,
Karol Bieniaszewski
 
 
Sent: Monday, May 23, 2016 9:32 PM
Subject: Re: [firebird-support] Question about few Firebird details
 
 

Hi Karol,

44. This option turn off individual savepoints. Our tests proof that gives slight  increase in case of massive inserts or updates. Use it with caution, since the rollback will be forced (through TIP), so if you insert less than 50k records, there could be difference with and without NO_AUTO_UNDO  - Firebird will be not able to transform rollback into commit with savepoints. If you insert more than 50k records (actually 50-60k, it depends on memory, not exact ##, if I remember correctly), rollback will be done through TIP anyway.

45. Try it with table like
CREATE TABLE T1(i1 integer not null primary key, iSort integer, BIGSTARTING VarchaR(2000));
insert there 10 mln records and do 2 queries as in the example. It will take 10 mins, and and you'll see the difference by yourself.

Regards,
Alexey Kovyazin
IBSurgeon


 
Hi,
 
i have few questions:
44. Use NO_AUTO_UNDO - what happend when i do rollback? I do not understand what really do this option..
30. Use derived tables to optimize SELECT with ORDER BY/GROUP BY -
SELECT T.FIELD_KEY, T.FIELD1, T.FIELD2, ... T.FIELD_N
FROM (SELECT FIELD_KEY FROM T ORDER BY FIELD2) T2
JOIN T ON T.FIELD_KEY = T2.FIELD_KEY
why this can be faster then?
SELECT FIELD_KEY, FIELD1, FIELD2, ... FIELD_N
FROM T
ORDER BY FIELD2
Firebird sort whole resultset of "sorted key - Field2" or do different work?
I see in FB3 plan sort width and it looks like not true but?
 
regards,
Karol Bieniaszewski