MON$-tables are unavaliable when optimizer prepares to execute query with lot 
of windowed functions
---------------------------------------------------------------------------------------------------

                 Key: CORE-4292
                 URL: http://tracker.firebirdsql.org/browse/CORE-4292
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0 Alpha 1
            Reporter: Pavel Zotov


Consider two complex queries - see attach.
Script  "prepare_too_long_and_hangs_monitoring.sql" contains a lot of calls to 
windowed functions and script "also_complex_but_NOT_trouble_in_preparing.sql" 
has no such calls but contains lot of scalar subqueries (in places where 
windowed functions were in first one).

The following scenario illustrates what there will be if we try to get 
execution plan of both queries.

session #1
=========
C:\1Install\fb30>isql localhost/3330:empty30 -n
Database:  localhost/3330:empty30
SQL>

session #2
=========
C:\1Install\fb30>isql localhost/3330:empty30 -n
Database:  localhost/3330:empty30
SQL> in prepare_too_long_and_hangs_monitoring.sql;
-- hangs (preparing takes about five minutes on my Linux server)

session #1
=========
SQL> set list on;
SQL> commit; select * from mon$attachments where 
mon$attachment_id<>current_connection 
CON> and mon$remote_protocol > is not null;
-- ALSO HANGS untill execution plan will appear in  session #2!

So, we can not querying MON$ATTACHMENTS during five minutes. And any other 
MON$-tables too.

PS. Script "also_complex_but_NOT_trouble_in_preparing.sql" does not leads to 
such trouble though it also too comples and also have lot of "calls" inside 
itself.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to