PostgreSQL Indexes

Indexes are important in database structures because they significantly improve the performance and efficiency of data retrieval operations.

PostgreSQL indexes in ER diagram

How to add indexes to your PostgreSQL data model

In Luna Modeler database design tool, indexes can be created in the right side panel or via modal form easily. To add a new index to a database table, edit your table (double click a table on the ER diagram), navigate to tab Indexes and click + Add Index (see item 1 on the following screenshot)

Adding new PostgreSQL index to an ER diagram

Specify index name (2) and add columns to the index by clicking the +Add Column to Index button (3) to display a dropdown with a list of available column names (4). Pick a column and then specify other index properties.

Index properties

Details of indexes and properties of columns that belong to the index can be specified in collapsible areas.

Collapsible area for editing index properties

Display mode & indexes

You can activate index display instead of column details. Click the Display button on the main toolbar and select Indexes.

Indexes displayed in ER Diagram for PostgreSQL.

Generated SQL script

To preview the SQL script, edit your table and navigate to tab SQL Script.

Generated SQL script for PostgreSQL indexes from ER diagram


Quick links

Download Buy Now!

Blog Categories
Blog by Platforms