Subject Re: [firebird-support] Re: Bad Performance after Backup-Restore
Author Arno Brinkman
Hi,

> I've compared the metadata of the origin and the backuped database, and
> they are eqaul. So I assume that the indices didn't get lost.
>
> Then I've looked on the plans, and they do differ. So I tried to provide
> the plan to the firebird server, and that worked perfekt:
> time on origin db : ~ 4 seconds
> time on backup db : ~ 4 minutes!! (no typo,
> it's real, belive me)
> time on backup*db with plan from origin db : ~ 3 seconds (here again, no
> typo)

> restored db:
> PLAN SORT (JOIN (LIN NATURAL,CI INDEX (RDB$PRIMARY22),POSGRP INDEX
> (RDB$PRIMARY49,RDB$FOREIGN122),GRPREL INDEX (RDB$FOREIGN109)))
>
> original db:
> PLAN SORT (JOIN (POSGRP INDEX (RDB$FOREIGN122),LIN INDEX
> (RDB$PRIMARY31),CI
> INDEX (RDB$PRIMARY22),GRPREL INDEX (RDB$FOREIGN109)))


Could you give us the statistics of the indexes (from both db's if
possible):

SELECT
RDB$INDEX_NAME,
RDB$STATISTICS
FROM
RDB$INDICES
WHERE
RDB$INDEX_NAME IN (
'RDB$PRIMARY31','RDB$PRIMARY22',
'RDB$PRIMARY49','RDB$FOREIGN122',
'RDB$FOREIGN109','RDB$FOREIGN122')

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://80.126.130.81