Choose your database:
AnySQL
MySQL
MS SQL Server
Oracle
PostgreSQL
SQLite
Firebird
SQL Anywhere
DB2
MaxDB

Subscribe to our news
Partners
Testimonials
Armin Braunstein: "Also I must say, that your PostgreSQL Maestro tool is the best tool for PostgreSQL I have seen. For general I am really happy about the tool and how it works".
Daryl Joubert: "I am evaluating your PostgreSQL Maestro product for purchase by my company and thus far I am very impressed! I really like the easy, intuitive and productive user interface and feature set. I am also evaluating a number of other products for PostgreSQL database design and maintenence but thus far SQLMaestro stands head and shoulders above the rest".

More

Add your opinion

PostgreSQL Maestro online Help

Prev Return to chapter overview Next

Setting index expressions

Expression

An index field can be an expression computed from the values of one or more columns of the table row. This feature can be used to obtain fast access to data based on some transformation of the basic data. For example, an index computed on upper(col) would allow the clause WHERE upper(col) = 'JIM' to use an index. To set the index expression, use the Add expression button and enter the expression in the corresponding window.

 

Example

Suppose, there is a table Employee with the salary and premium fields and queries as follows are executed very often.

 

SELECT *

FROM "Employee"

WHERE "salary"+"premium">5000;

 

To create an index making such queries faster, set salary+premium as the index expression.

 



Prev Return to chapter overview Next