In most SQL databases, Primary key
s are automatically indexed.
SELECT tablename, indexname, indexdef FROM pg_indexes WHERE schemaname = 'public'
CREATE INDEX index_name ON table_name (column1, column2, ...); CREATE INDEX idx_customer_name ON Customers (customer_name);