• Resolved mtrofimm

    (@mtrofimm)


    We noticed that there are lots of heavy sql statements. We have site and plugin (v. 3.1.57) ready running.

    There statements are difficult or impossible to cache.
    See below:

    CREATE TABLE IF NOT EXISTS wp_sib_model_forms ( id int(?) NOT NULL AUTO_INCREMENT, title varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, html longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci, css longtext, dependTheme int(?) NOT NULL DEFAULT ?, listID longtext, templateID int(?) NOT NULL DEFAULT -?, confirmID int(?) NOT NULL DEFAULT -?, isDopt int(?) NOT NULL DEFAULT ?, isOpt int(?) NOT NULL DEFAULT ?, redirectInEmail varchar(?), redirectInForm varchar(?), successMsg varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, errorMsg varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, existMsg varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, invalidMsg varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, requiredMsg varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, attributes TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, date DATE NOT NULL, isDefault int(?) NOT NULL DEFAULT ?, gCaptcha int(?) NOT NULL DEFAULT ?, gCaptcha_secret varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, gCaptcha_site varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, termAccept int(?) NOT NULL DEFAULT ?, termsURL varchar(?) CHARACTER SET utf8 COLLATE utf8_unicode_ci, PRIMARY KEY (id) );

    SHOW COLUMNS FROM wp_sib_model_forms LIKE ?

    Can you check and optimize the code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support alexisbienayme

    (@alexisbienayme)

    Hi @mtrofimm,

    There are few mysql statements which are required by our plugin. However, we can eventually review them.

    Could you please explain the impact so I can check with our tech team ? If so, is there a way for us to reproduce it ?

    Looking forward to hearing from you.

    Best Regards,

    Alexis

    Thread Starter mtrofimm

    (@mtrofimm)

    Hi,

    Thanks for reply.

    Statements like ‘create table’ are very ‘heavy’ in database terms. They require a expensive locking mechanism. We noticed that the above mentioned sql is executed every time a user visits a page containing the form. If you have busy site this leads to congestion in mysql. In our case on average statements like ‘create table’ take about 3 seconds (!)

    If I could suggest some kind of improvement, you could consider:
    1. executing sqls that create, change etc db during the installation and upgrade of the plugin.

    2. using “select from information_schema” to check if all necessary tables are craeted and have all columns etc.

    Plugin Support alexisbienayme

    (@alexisbienayme)

    Hi @mtrofimm,

    Thank you for bringing this potential issue with the “create table” query to our attention. We take performance issues with our product seriously and appreciate your feedback.

    Our product team has been informed of your suggestion to execute database queries during installation and upgrades of the plugin, as well as using “select from information_schema” to check for necessary tables and columns. We will discuss this in our meeting and determine the best course of action to address this issue.

    Thank you again for your valuable feedback.

    Best regards,

    Alexis

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redundant create table statements’ is closed to new replies.