Subject Re: [firebird-support] Performancelost after Migration to FB 2
Author Guido Klapperich
> Please update the statement and apply table aliases -- it is very
> difficult to see the relationship between the fields in the WHERE clause
> and the tables.

I encode a alias implicit by a table prefix, that means every field of
the table starts with the prefix. The prefix for the table GFK_DATA is
GD, so the fields GDTitle,GDEAN,GDPUBLISHER,GDPCID belong to GFK_DATA.
The prefix for the table GFK_PRODUCTAREAS is GA.

>
> Second, what are the PLANs which are generated for the queries?

FB2
PLAN (P_GET_SELL_THRU_VARIABLES NATURAL)(PRODUCTS INDEX
(RDB$PRIMARY56))(PRODUCTS INDEX
(RDB$PRIMARY56))(P_SELL_THRU_PER_PRODUCT2
NATURAL)(P_SELL_THRU_PER_PRODUCT2 NATURAL)JOIN (BUNDLES INDEX
(RDB$FOREIGN113), GFK_DATA INDEX (GDPCID), GFK_PRODUCTAREAS INDEX
(PK_GFK_PRODUCTAREAS))SORT (JOIN (GFK_PRODUCTAREAS NATURAL, GFK_DATA
INDEX (GFK_DATA_IDX1)))

FB1.5
PLAN (PRODUCTS INDEX (RDB$PRIMARY56))(PRODUCTS INDEX
(RDB$PRIMARY56))JOIN (BUNDLES INDEX (RDB$FOREIGN113),GFK_DATA INDEX
(GDPCID),GFK_PRODUCTAREAS INDEX (PK_GFK_PRODUCTAREAS))SORT (JOIN
(GFK_PRODUCTAREAS NATURAL,GFK_DATA INDEX (GFK_DATA_IDX1)))


You see in the plan the SP P_GET_SELL_THRU_VARIABLES and the table
BUNDLES, that are disabled by some parameters of the SP, so they don't
are interesting.

>
> What indexes are defined on the tables?

There are a lot of them. Perhaps you can point me to some issues, that
might be important concerning the indices.

>
>
> The performance analysis shows that the database has a cache size of 60
> 000 pages, is this correct?

That is correct.

>
> What is the page size of the databases?

8K

>
> It is possible that you don't have enough RAM in the server to support
> both databases being open at the same time? (Cache size) So, the
> server is performing a lot of paging to disk?

The server has 2GB RAM. But the DB are never open at the same time. I
have both FB 1.5 and FB 2 installed on the machine. I start FB 1.5, do a
performance test, stop FB 1.5, start FB 2 and so on.


Guido