-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modsource-816 [RRT] Optimize execution plan for streaming SQL (#656)
* append logger * MODSOURCE-816 [RRT] Optimize execution plan for streaming SQL * MODSOURCE-816 [RRT] Optimize execution plan for streaming SQL * add news md, remove logger * fix script * replace or with in * fix tests
- Loading branch information
1 parent
5d2ee90
commit dd3baed
Showing
4 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...quibase/tenant/scripts/v-5.10.0/2024-11-22--16-00-create-indexes-on-marc-indexers-005.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd"> | ||
|
||
<changeSet id="2024-11-22--16-00-create-immutable-to-date-function" author="javokhir_abdullaev"> | ||
<createProcedure> | ||
CREATE OR REPLACE FUNCTION ${database.defaultSchemaName}.immutable_to_date(input_text TEXT) RETURNS date AS $$ | ||
DECLARE | ||
output_date DATE; | ||
BEGIN | ||
IF input_text ~ '^[0-9]+(\.[0-9]+)?$' THEN | ||
RETURN to_timestamp(input_text::DOUBLE PRECISION / 1000)::date; | ||
ELSE | ||
BEGIN | ||
output_date := to_date(substring(input_text, 1, 8), 'yyyymmdd'); | ||
EXCEPTION WHEN others THEN | ||
RETURN NULL; | ||
END; | ||
RETURN output_date; | ||
END IF; | ||
END; | ||
$$ LANGUAGE plpgsql IMMUTABLE; | ||
</createProcedure> | ||
</changeSet> | ||
|
||
<changeSet id="2024-11-22--16-01-create-indexes-on-005-partition" author="javokhir_abdullaev"> | ||
<sql> | ||
CREATE INDEX idx_records_lb_suppress_discovery ON ${database.defaultSchemaName}.records_lb (suppress_discovery); | ||
CREATE INDEX idx_marc_records_tracking_marc_id_version ON ${database.defaultSchemaName}.marc_records_tracking (marc_id, version); | ||
CREATE INDEX idx_marc_indexers_005_marc_id ON ${database.defaultSchemaName}.marc_indexers_005 (marc_id); | ||
CREATE INDEX idx_marc_indexers_005_value_date ON ${database.defaultSchemaName}.marc_indexers_005 (${database.defaultSchemaName}.immutable_to_date(value)); | ||
</sql> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |