Subject Re: [firebird-support] Re: How to get a good performance
Author Pavel Menshchikov
Hello,

>> Try to add DESC index on field_A: in FB indices are uni-directional.
>> If field_A has a poor selectivity, add compound DESC index on
>> (field_A, primary_key) instead of adding DESC index on field_A.

d> I think What is strainge is that,
d> They are same databases in MSSQL and firebird,
d> with same tables, same indices, same data.

d> but MSSQL uses memory as 10 times as Firebird uses.

I can't tell anything about memory consuming with MSSQL: I guess it
consumes as much memory as it wants (needs?). Probably, MSSQL uses
memory to maintain groupping information in a different way as
compared to FB...

What about the performance in FB with your original SELECT MAX...
after adding DESC index? And memory usage with FB?



--
Best regards,
Pavel Menshchikov
http://www.ls-software.com