Issue Details (XML | Word | Printable)

Key: CORE-5602
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Holger Klemt
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

slow changes on domain

Created: 04/Sep/17 12:12 PM   Updated: 14/Sep/17 07:45 PM
Component/s: Engine
Affects Version/s: 3.0.2
Fix Version/s: 3.0.3

Environment: fb302 win64

QA Status: Done successfully


 Description  « Hide
i reported this issue directly to vlad based on a customer database that we can not upload here

if have no idea why but executing these statements, each take about 2 minutes on a fast machine

ALTER DOMAIN BOOL DROP CONSTRAINT;

ALTER DOMAIN BOOL ADD CHECK (VALUE IN ('T', 'F'));

(checked with with another db with 500 generated tables and each
using a simlar domain 10 times, but this db much faster)

Vlad already told me that he found some not good defined system queries.


additional problem perhaps:
i do not know if it is the same problem, but for example on rdb$procedures, we do no longer have an index on rdb$procedure_name, only a combined index on
RDB$PACKAGE_NAME,RDB$PROCEDURE_NAME

Some old code did a select on rdb$procedures joined it on RDB$PROCEDURE_NAME with a user based table for special userrights.
In fb <=25 it was very fast, in fb>=30 this part create a very bad crossjoin and when you have several thousands stored procs in the
database, it does not work well.

perhaps for compatibility reasons, there should be not only the combined index on tables that now have rdb$package

tables are

RDB$DEPENDENCIES,RDB$FUNCTIONS,RDB$FUNCTION_ARGUMENTS,RDB$PROCEDURES,RDB$PROCEDURE_PARAMETERS,RDB$VIEW_RELATIONS

perhaps all systemqueries need a review based on this, and i also found that RDB$DEPENDENCIES does have a rdb$package column, but it has no index at all

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 04/Sep/17 01:15 PM
Please, test next snapshot build

Holger Klemt added a comment - 05/Sep/17 11:10 AM
tested with Firebird-3.0.3.32801-0_Win32 embedded, takes now less than 400ms, so all ok
(commit still took around 6 seconds, for whatever reasons ...)