DEV Community

pbohea
pbohea

Posted on

Add Index

adding index to non-foreign key columns enables faster lookups. i.e. if you add index to the email column for the User model, instead of searching every single user top to bottom, it will seek out that value.

when creating model or scaffold, you don't need to define index for foreign key columns

Top comments (0)