ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Channel entries and SQL JOIN

April 19, 2012 11:16am

Subscribe [1]
  • #1 / Apr 19, 2012 11:16am

    pmithrandir2

    2 posts

    Hello

    I’m currently working on a expression engine portal for my company. I didn’t create it, but they need me to optimize some pages.

    One of them contains the following code :

    {exp:channel:entries channel="change_operations_planning" orderby="date" sort="desc" disable="member_data|trackbacks" dynamic_parameters="search:changeop_service|search:changeop_mco" date_field="changeop_predicted_start_date" date2_field="changeop_predicted_end_date" date_field_start="<?php echo $date_field_start; ?>" date_field_stop="<?php echo $date_field_stop; ?>" limit="500" }
    
    <tr>
    ....
    </tr>
    {/exp:channel:entries}


    very simple case, but with maybe 20 filter on it.

    The bad joke, is that there is 400 results, resulting in 400 sql queries to load the page.

    It takes almost 30 seconds to generate the page with 500 results (just the queries) when I can get the same result with a join in the SQL in 0.05s.(without using cache and for 4000 results)

    My questions are :
    - Is it possible to ask the system to use a join and to get all results in one query. (basically, join chnnel title and channel datas) i can force the field name if needed, i have all of them.
    - Is it possible to ask EE to prefer a pagination with AJAX query. (it would limit the query to 50 elements in place of 4000, so it will improve the process a lot.

    I didn’t got the time to find in my company who got the licence number.(but i know we paid it, it was said in one meating I had)
    Sorry if it’s not the right place.

    Pierre

  • #2 / Apr 19, 2012 1:50pm

    Bhashkar Yadav

    727 posts

    - Is it possible to ask the system to use a join and to get all results in one query. (basically, join chnnel title and channel datas) i can force the field name if needed, i have all of them.

    it’s not possible.

    - Is it possible to ask EE to prefer a pagination with AJAX query. (it would limit the query to 50 elements in place of 4000, so it will improve the process a lot.

    pagination will be great idea to optimize the page. you can use AJAX Pagination for it.

     

    Best Regards,

  • #3 / Apr 20, 2012 3:03am

    pmithrandir2

    2 posts

    Hello.

    I found this extension yesterday also.

    Do you think it will works with some filter on the page ?
    Is it compatible with dynamic content ?

    I didn’t found anything like that in the 3 demos.

    thanks

  • #4 / Apr 20, 2012 11:07am

    Bhashkar Yadav

    727 posts

    Do you think it will works with some filter on the page ?

    No

    Is it compatible with dynamic content ?

    Yes

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases