Okay
  Public Ticket #3084779
performance issue
Closed

Comments

  • Damien Ramage started the conversation

    Hello

    First of all, great plugin ! The various features are time saving and much easier to set up than your own hand coded instance of datatables, so thank you.

    However i've encountered an issue which is very troubling

    I have two custom post type with different custom fields and taxonomies and a very high number of entries (thousands or 10s of thousands). In theory, your plugin should allow me to access this data through a wp query by using server side processing.

    It works fine when I only use one or two columns, but as soon as I add some, the table preview stops working and i get an error message "db disappeared" and it returns an empty query!

    My main issue is that you cannot edit the SQL query after creating the table, so if it doesn't work right off the bat, i can't create a "lite" query that I would then expand one field at a time.

    The problem is, my datatable works fine it if i create my own hand coded DT, so the server can take the load, but the ajax call to the query preview in your plugin is returning an error even though i know it should work. 

    any idea how to work around this?


  •  2,572
    Aleksandar replied

    Hello Damien

    Thank you for your kind words.

    On this link, you can see a table with over 2.5 million entries, so the size is not causing any issues here.

    Our logic is based on a PHP SQL parser which has full support for the SQL dialect for the following statement types

    SELECT, INSERT, UPDATE, DELETE, REPLACE, RENAME, SHOW, SET, DROP, CREATE INDEX, CREATE TABLE, EXPLAIN and DESCRIBE.

    Some of them are disabled for security reasons.

    Filtering, sorting, and searching may not work properly if you include:

    • Accent graves ( ` ) around the table name
    • JOIN functions
    • UNION functions
    • CONCAT functions
    • sub-queries

    You can try preparing a MySQL view (which will return the data that you need, call it e.g. “view1” and then build a wpDataTables based on a simple query like "SELECT * FROM view1″.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Damien Ramage replied

    thanks for the quick answer 


    it was an issue with both JOIN and CONCAT functions, but apparently necessary when querying some Wordpress content in this case 


    the work around I found was by using a php array instead, using Wordpress functions to directly return values 


    it’s now working with over 50 000 entries ! 



  •   Damien Ramage replied privately
  •  2,572
    Aleksandar replied

    Great news, Damien, thanks for letting me know!

    If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables