Database Table Indexes in OpenCart
Posted: Sun Feb 28, 2010 3:29 am
I've just reviewed the database structure of OpenCart, and although I think the database is very well designed in terms of good database design principles and consistent naming, I was shocked to find that there were practically NO INDEXES defined on the database with the exception of primary keys.
What this means is that for any store with a large number of products (i.e. 50,000, like in our case) the store would not perform very well.
As the absolute minimum indexes should be defined on
- Foreign key fields by which data is queried or joined
- Fields on which data is filtered (e.g. on Products this would be Price, Status, etc)
Can someone on the core development team please add proper indexes to tables or let me know how I can contribute this into the core.
What this means is that for any store with a large number of products (i.e. 50,000, like in our case) the store would not perform very well.
As the absolute minimum indexes should be defined on
- Foreign key fields by which data is queried or joined
- Fields on which data is filtered (e.g. on Products this would be Price, Status, etc)
Can someone on the core development team please add proper indexes to tables or let me know how I can contribute this into the core.