Hands-on task
This task is step 8 of the course “SQL with SQLite”
SQLite: index on a foreign key
The table orders(id, customer_id, amount) in the database /root/shop.db is often filtered by the customer_id column, and such queries are slow. Create an index named idx_customer on the customer_id column.
Reference:sqlite3
What you'll practise:
- sqlite3
- create index
- indexes
- query optimization
- sqlite_master