New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External data source selects became slow [CORE5104] #5388
Comments
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 RC2 [ 10048 ] |
Commented by: @pavel-zotov > It seems that the connection is now not reused anymore and a new one is opened with every select. It's not so and can be easy verified:set list on; set term ^;
end
|
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Deferred Test Details: Have no idea how to make time comparison with results that are obtained on other FB version (they should be stored somewhere). |
Commented by: michalk1 (michalk1) Pavel, by "select" I meant calls of the entire execute block from the original database, not selects inside the execute block itself. And in that case, current_connection really returnes different values in 3.0.0.32323 (unlike 3.0.0.32136). But it is ok now, Vlad already fixed it in 3.0.0.32330. |
Commented by: @pavel-zotov michalk1, I still can`t understand how did you receive different transactions by mean "calls of the entire execute block from the original database". Can you please provide sample testcase where one may see "connection is now not reused anymore and a new one is opened with every select" ? PS. If we create database (/var/db/fb30/e30test.fdb) and view in it: ===
|
Commented by: michalk1 (michalk1) > Can you please provide sample testcase where one may see "connection is now not reused anymore and a new one is opened with every select" ? Ok, here it is: 1) Install FB 3.0.0.32323 EXECUTE BLOCK RETURNS (eds_conn INTEGER) AS This statement should reuse the same transaction and connection in the external database, because it is called with the default - WITH COMMON TRANSACTION - setting. In 3.0.0.32323, however, the statement returns different connection numbers. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] Test Details: Have no idea how to make time comparison with results that are obtained on other FB version (they should be stored somewhere). => > affects local and embedded connections only |
Submitted by: michalk1 (michalk1)
Since original FB3.0 RC1 release the execution of external selects became very slow. It seems that the connection is now not reused anymore and a new one is opened with every select. Ie., the following simple statement, which in FB 3.0.0.32136 was able to run 500 times per second, in the current snapshot build 3.0.0.32323 went down to 6/s.
EXECUTE BLOCK RETURNS (Cnt INTEGER) AS
begin
EXECUTE STATEMENT 'SELECT COUNT (*) FROM RDB$DATABASE'
ON EXTERNAL DATA SOURCE 'C:\TestDb.Fdb'
WITH COMMON TRANSACTION
AS USER 'sysdba' PASSWORD 'masterkey'
INTO :Cnt;
suspend;
end
Btw., the database connect itself is now slower than is used to be in FB 2.5. Where FB2.5 made 15 connections/second (connect and disconnect repeatedly), FB3.0 now does just 5 per second. But for common attachments this is probably not as important (can be workaround with connection pool if needed).
Commits: c0e078a 99cbccc FirebirdSQL/fbt-repository@f0943d7 FirebirdSQL/fbt-repository@3cf69a9
====== Test Details ======
> affects local and embedded connections only
Deferred because currently only remote protocol is used.
The text was updated successfully, but these errors were encountered: