SQL CREATE INDEX Generator
Generate CREATE INDEX statements for PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. Unique, partial, covering, and concurrent indexes.
1. Dialect & Table
2. Columns
3. Options
PostgreSQL supports CONCURRENTLY, partial indexes (WHERE), and INCLUDE. MySQL supports ALGORITHM=INPLACE. SQL Server supports ONLINE=ON and INCLUDE.
4. Generated SQL
-- Configure options above to generate CREATE INDEX
Quick Examples
Basic Single-Column
Standard B-tree index on users(email).
PostgreSQLMySQL
Unique Index
Enforce uniqueness on orders.order_number.
All Dialects
Composite Index
Multi-column index on products(category_id, price DESC).
Performance
Partial Index
Index only active users to save space and improve speed.
PostgreSQLSQLite
Covering Index
Include extra columns to satisfy queries without table lookups.
PostgreSQLSQL Server
Concurrent Creation
Build index without locking the table on large datasets.
PostgreSQLSQL Server