No indexes on Formidable* tables, can cause MySQL to crash

Permalink Browser Info Environment
Just a heads up - if you receive a lot of form submissions, chances are when you go to "Formidable -> Reports" it'll hang and/or crash MySQL.

This is because there are no indexes on the data and one of the queries to view the table of submissions can be potentially huge and with no indexes it's going to load all of the answers every time in memory until it finds matches for each row.

I added indexes as follows;

Table: FormidableAnswers, Indexes: answerSetID, formID, elementID
Table: FormidableAnswerSets, Indexes: formID, temp, collectionID
Table: FormidableFormElements, Indexes: formID, layoutID

This simple change turned the query from 10 minutes (and sometimes killing MySQL) to 0.098 seconds!

Note to developer: I would optimise your queries for a future release :)

Cheers

James

Type: Discussion
Status: Resolved
jcrooke
View Replies:
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi James,

Not sure which version you are running, but the later version should have indexes on them.

Best,

Corretje

concrete5 Environment Information

N/A

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.