DEV Community

loading...

Discussion on: Speed up your queries with indexes

Collapse
ashleyjsheridan profile image
Ashley Sheridan

Presumably it's the same for MSSQL, but MySQL allows you to create indexes across multiple columns. This is very useful in a lot of situations where the identifying feature of the data is a combination of two or more things, e.g. user ID and a friend ID, where you'll likely have a row for each of the ID links.

Collapse
helenanders26 profile image
Helen Anderson Author

Nice catch! In the real world I’ll create indexes across more than one column, as you’ve described. But in the interests of simplicity kept it to just one in the examples