Subject | Slow Open query with SP |
---|---|
Author | ainpoissee |
Post date | 2005-12-14T15:30:45Z |
Hi!
I have a query like
SELECT Tooleping, TehtiGr FROM
JatkaTyypgraafikuid(NULL,NULL,NULL,NULL,NULL,'2005-11-01',
'2005-11-30', 3)
which returns about 10 rows. The problem is, that it takse about
minute to "open" this query. Ie when I execute this query in IBConsole
I have to wait about 1 minute and then all 10 rows appear without any
delay.
Query plan (as per IBConsole) is
PLAN JOIN (VIEW_GRAAFIKU_VAHETUS TAB_TOOLEPING INDEX
(RDB$PRIMARY15),VIEW_GRAAFIKU_VAHETUS TAB_GRAAFIK INDEX
(FK_TLEPING_G,CU_GRAAFIK_KUUPLEPVAH),VIEW_GRAAFIKU_VAHETUS TAB_VAHETUS
INDEX (RDB$PRIMARY4,FK_VLIIK,FK_VLIIK,FK_VLIIK))(TAB_TYYPGRAAFIK INDEX
(RDB$PRIMARY30))(TAB_TYYPGRPAEV INDEX (FK_TYYPGR))
The SP JatkaTyypgraafikuid has a FOR SELECT loop where stuff is done
and when I execute this SELECT statement in the IBC then I get these
10 rows without any delay... so it looks like FB 1.5 has some problem
to prepare the original select staement. Any idea?
TIA
ain
I have a query like
SELECT Tooleping, TehtiGr FROM
JatkaTyypgraafikuid(NULL,NULL,NULL,NULL,NULL,'2005-11-01',
'2005-11-30', 3)
which returns about 10 rows. The problem is, that it takse about
minute to "open" this query. Ie when I execute this query in IBConsole
I have to wait about 1 minute and then all 10 rows appear without any
delay.
Query plan (as per IBConsole) is
PLAN JOIN (VIEW_GRAAFIKU_VAHETUS TAB_TOOLEPING INDEX
(RDB$PRIMARY15),VIEW_GRAAFIKU_VAHETUS TAB_GRAAFIK INDEX
(FK_TLEPING_G,CU_GRAAFIK_KUUPLEPVAH),VIEW_GRAAFIKU_VAHETUS TAB_VAHETUS
INDEX (RDB$PRIMARY4,FK_VLIIK,FK_VLIIK,FK_VLIIK))(TAB_TYYPGRAAFIK INDEX
(RDB$PRIMARY30))(TAB_TYYPGRPAEV INDEX (FK_TYYPGR))
The SP JatkaTyypgraafikuid has a FOR SELECT loop where stuff is done
and when I execute this SELECT statement in the IBC then I get these
10 rows without any delay... so it looks like FB 1.5 has some problem
to prepare the original select staement. Any idea?
TIA
ain