5 ms·
I think he intended to say that Rails does not (cannot) automatically add indexes to your database, which is true and makes more sense in the context.
by sant0sk1 16y ago
I think he intended to say that Rails does not (cannot) automatically add indexes to your database, which is true and makes more sense in the context.
- rudiger 16y agoAre there any frameworks that do this?
- rahoulb 16y agoIf there are they shouldn't. As mickeyben says above, choosing indexes is a compromise - you sacrifice performance in one area for performance in another. Only you can make the right decision there, because only you can begin to know how the app will be used in production.
- gcampbell 16y agoDataMapper's dm-constraints plugin (https://github.com/datamapper/dm-constraints https://github.com/datamapper/dm-constraints) can automatically add foreign key constraints to your associations, which has the side effect (in MySQL at least) of creating indices on the foreign key columns if they don't already exist.