Post by Sheldmandu » 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.

New member


Sat Feb 27, 2010 10:43 am

Post by Miguelito » Tue Mar 02, 2010 3:28 am

A very good point - database is the basic data machine behind this all. Hopefully Daniel & core team will see this thread and contact you :)

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."

Active Member


Sun Jan 10, 2010 10:11 pm

Post by rph » Tue Mar 02, 2010 3:50 am

The quickest way is probably to make the changes to opencart.sql and submit it to Daniel though it can unfortunately be rather difficult to get changes included. For existing websites you could release an SQL file making the changes to the board and user mods section.


Expert Member


Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by AndCycle » Mon Feb 25, 2019 4:55 pm

it's 2019, and I still need to do the index by my self, well done.



Thu Jan 17, 2019 8:43 pm

Post by IP_CAM » Mon Feb 25, 2019 9:10 pm

Well, such an extension exists for Years already, but if you
expect everything, to be built-in already by default, you better
look around for a paid Software, then you might have a reason to.

I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site:
4'100 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.

User avatar
Legendary Member


Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 1 guest