---In firebird-support@yahoogroups.com, <michkurc@...> wrote :
 
 Hi,
 
 > fb 2.5.7.27050_0_x64
 > fb 3.0.1.32609_0_x64
 >
> same table and data:
 > 
...
> 
> select count(*) from t1
 > 
> //FB 2.5 time 4 sec.
> //FB 3.0 time 6 sec
 > 
> //now select first 1 mln recs order by id desc
 > 
> select first 1000000 * from t1 order by id desc
 > 
> //FB 2.5 time 11 sec
> //FB 3.0 time 1 min 54 sec.

  The main question - where selected records was directed to ? I.e. you select 
1 mln records and
where do you store it ? Show on console ? It will be sloooow and doesn't depend 
on Firebird at all.
I run this in isql (note "output null" below):

a) 2.5.7.27038

SQL> set plan;
SQL> set stat;
SQL> output null;

SQL> select count(*) from t1;

PLAN (T1 NATURAL)
Current memory = 9395256
Delta memory = 124384
Max memory = 9465760
Elapsed time= 2.40 sec
Buffers = 2048
Reads = 151770
Writes 0
Fetches = 20303446

SQL> select first 1000000 * from t1 order by id desc;

PLAN SORT ((T1 NATURAL))
Current memory = 9396336
Delta memory = 1080
Max memory = 71268832
Elapsed time= 10.58 sec
Buffers = 2048
Reads = 151591
Writes 0
Fetches = 20303022


b) 3.0.1.32609

SQL> set plan;
SQL> set stat;
SQL> output null;

SQL> select count(*) from t1;

PLAN (T1 NATURAL)
Current memory = 10928296
Delta memory = 251424
Max memory = 10997848
Elapsed time= 3.311 sec
Buffers = 2048
Reads = 151821
Writes = 0
Fetches = 20303499

SQL> select first 1000000 * from t1 order by id desc;

PLAN SORT (T1 NATURAL)
Current memory = 10929000
Delta memory = 704
Max memory = 73851528
Elapsed time= 12.710 sec
Buffers = 2048
Reads = 151621
Writes = 0
Fetches = 20303049


c) 3.0.2.32691

SQL> set plan;
SQL> set stat;
SQL> output null;

SQL> select count(*) from t1;

PLAN (T1 NATURAL)
Current memory = 11024632
Delta memory = 251424
Max memory = 11094184
Elapsed time= 2.390 sec
Buffers = 2048
Reads = 151821
Writes = 1
Fetches = 10606295

SQL> select first 1000000 * from t1 order by id desc;

PLAN SORT (T1 NATURAL)
Current memory = 11025336
Delta memory = 704
Max memory = 73947864
Elapsed time= 11.653 sec
Buffers = 2048
Reads = 151621
Writes = 0
Fetches = 10605902

Regards,
Vlad



  • [firebird-suppor... Michal Kurczabinski michk...@gmail.com [firebird-support]
    • [firebird-s... hv...@users.sourceforge.net [firebird-support]
      • Re: [fi... Michal Kurczabinski michk...@gmail.com [firebird-support]
        • Re:... Michal Kurczabinski michk...@gmail.com [firebird-support]
          • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
            • ... Michal Kurczabinski michk...@gmail.com [firebird-support]
          • ... hv...@users.sourceforge.net [firebird-support]
          • ... hv...@users.sourceforge.net [firebird-support]
            • ... Michal Kurczabinski michk...@gmail.com [firebird-support]
        • Re:... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]

Reply via email to