-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TABLES_WITHOUT_DESCRIPTION] Consider to skip partitions of table (#538)
* Add info about partitioning support * Update queries * Add tests
- Loading branch information
Showing
9 changed files
with
124 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
version: "3.9" | ||
|
||
services: | ||
postgres: | ||
image: postgres:17.2 | ||
|
Submodule resources
updated
2 files
+7 −6 | sql/columns_without_description.sql | |
+2 −1 | sql/tables_without_description.sql |
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
33 changes: 33 additions & 0 deletions
33
...ub/mfvanek/pg/core/fixtures/support/statements/CreatePartitionedTableWithoutComments.java
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,33 @@ | ||
/* | ||
* Copyright (c) 2019-2024. Ivan Vakhrushev and others. | ||
* https://github.com/mfvanek/pg-index-health | ||
* | ||
* This file is a part of "pg-index-health" - a Java library for | ||
* analyzing and maintaining indexes health in PostgreSQL databases. | ||
* | ||
* Licensed under the Apache License 2.0 | ||
*/ | ||
|
||
package io.github.mfvanek.pg.core.fixtures.support.statements; | ||
|
||
import java.util.List; | ||
import javax.annotation.Nonnull; | ||
|
||
public class CreatePartitionedTableWithoutComments extends AbstractDbStatement { | ||
|
||
@Nonnull | ||
@Override | ||
protected List<String> getSqlToExecute() { | ||
return List.of( | ||
"create table if not exists {schemaName}.custom_entity_reference_with_very_very_very_long_name(" + | ||
"ref_type varchar(32) not null," + | ||
"ref_value varchar(64) not null," + | ||
"creation_date timestamp with time zone not null," + | ||
"entity_id varchar(64) not null," + | ||
"primary key(ref_type, ref_value, creation_date, entity_id)" + | ||
") partition by range (creation_date);", | ||
"create table if not exists {schemaName}.custom_entity_reference_with_very_very_very_long_name_1_default " + | ||
"partition of {schemaName}.custom_entity_reference_with_very_very_very_long_name default;" | ||
); | ||
} | ||
} |
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