Skip to main content

Indexes

Adding an Index

To improve the performance of your queries, you can add indexes to your database tables. The Add Index screen allows you to define the name, type, and columns to be indexed.

Add Index Interface

The interface for adding an index has the following fields:

  • Index Name:

    • A unique name for the index.
    • Example: idx_user_id.
  • Index Type:

    • Select the type of index. Options may include:
      • INDEX: A basic index that improves query performance.
      • UNIQUE: Ensures that the values in the indexed column are unique.
      • FULLTEXT: Useful for text searching.
      • SPATIAL: Used for spatial data indexing.
    • Example: UNIQUE.
  • Select Column:

    • Choose the column(s) to be indexed.
    • Example: id column.

Actions Available

Below the form, you can see a list of previously created indexes, along with actions you can take:

Index NameIndex TypeActions
idUNIQUE
  • Edit: Allows you to modify the index by changing its name, type, or columns.
  • Delete: Removes the index from the table. Clicking the trash icon will delete the selected index.

Buttons

  • Save: Once you have configured the index, press "Save" to apply the index to your table.
  • Cancel: Click "Cancel" to close the window without saving changes.

In this example, the id column has a UNIQUE index, ensuring that no two rows in the table will have the same value for the id column.