Using PostgreSQL database with BMC Helix Innovation Suite
(On-premises deployments) Case sensitivity in queries
By default, the PostgreSQL database is case sensitive. However, PostgreSQL supports a special datatype called citext for case insensitive matching. If the database case sensitivity is false, the server appends ::citxet to the string columns and string literal values in Where clauses for case insensitivity matching.
Considerations when working with PostgreSQL
When you use the PostgreSQL database engine, you must use specific operators and functions to perform certain actions in BMC Helix Innovation Suite. For more information about the list of these functions, see Changes-in-BMC-Helix-Innovation-Suite-to-support-PostgreSQL-database.
Remediation with deadlock and blocking while DDLs are in progress
Data Definition Language (DDL) defines the structure of the database and the relationships between the data objects in the database.
When you upgrade to a latest version of BMC Helix Innovation Suite, multiple DDL calls are made to update the database. In the context of Zero Down Time (ZDT), DDL calls are made when the metadata is being updated such as an update to a new patch, a change made in Developer Studio or BMC Helix Innovation Studio, or a D2P deployment.
Running DDL calls requires exclusive lock on the underlying objects that are being changed. When a DDL gets an exclusive lock, it updates the database quickly. However, because PostgreSQL acquires shared locks even for SELECT queries, a PostgreSQL query might prevent a DDL from having an exclusive lock and block that DDL call.
In SaaS environments, specific scripts are run in case a DDL is blocked, and the database query is run seamlessly.
In on-premises environments, a database administrator might monitor the query patterns to decide if they want to create and run appropriate scripts to handle DDL blocking.
Methods to improve performance of BMC Helix Innovation Suite with PostgreSQL database
Use any of the following methods to improve the performance of the PostgreSQL database:
Index types
Indexes are database structures that enhance query performance by enabling quick data retrieval. Analyze your application's data and query patterns to determine which columns would benefit from indexing. Use the information in the following table to understand the usage of different index types:
Index type | Description |
---|---|
B-Tree | The B-Tree index is the default index type in PostgreSQL. This index type is suitable for most scenarios. We recommend you use this index type when exact matches are required, such as when you use the = operator and when the expected results are less than 50 characters. Depending on where you want to create the B-Tree index, chooseBMC Helix Innovation Studio or Developer Studio. For example, if you want to create an index for a record definition, use BMC Helix Innovation Studio and to create an index for AR System forms, use Developer Studio. |
Hash | If B-Tree index is not optimal, create a hash index when exact matches are required for the data query such as when you use the = operator and when the expected results are more than 50 characters. |
GIN | Create a GIN index when you want to run a query which has a larger data match for the query such as when you use the LIKE operator. |
For more information about different types of indexes in PostgreSQL, see the PostgreSQL online documentation.
Casting with citext
If you are using any custom queries for generating reports in AR System, or running direct SQL queries in Pentaho jobs or in workflows, where the database might convert the data type for case sensitivity, use ::citext to enable casting for the citext data type. For example, the following query in a Pentaho job might perform poorly:
However, appending ::citext to this query improves the performance of this query. The following query is the corrected query that works faster:
Collation support for unicode languages
Improve the performance of the database by specifying how special characters in unicode languages are matched with the query. For example, specify if the letters Ö, Õ, ø, and o should be treated the same as the letter O, or a generic selection such as -global- in a menu list is placed at the top of the list or alphabetically in the list.
The default collation support for BMC Helix Innovation Suite is English. However, you can modify the collation for the specific database columns to improve the performance of the queries. For more information about the collations that are supported in PostgreSQL, see the PostgreSQL online documentation.