• A new version of Full Calendar is now available.

    See the details here

Slow form caused by the generation of the database join field

paolo.tateo

Member
Hi Fabrik people!

Joomla 2.5.24
Fabrik 3.0.5.2

My problem is this: I have a form with in many databasejoin fields like this:
Render join as: Drop-down
Connection: site database
Table: jos_app_order_status
Value: id
Label: order_status_name
Joins where and/or order by statement (SQL): WHERE id_contest="{$my->id}"


I enabled fabrikdebug (?fabrikdebug=1) and look what happens when Fabrik trying to render the field.

Strangely Fabrik perform two queries to create the array of values:

Code:
Array
(
    [SELECT DISTINCT(`jos_app_order_status`.`id`) AS value, order_status_name AS text FROM `jos_app_order_status` AS `jos_app_order_status`  ORDER BY text ASC ] => Array


And after

Code:
    [SELECT DISTINCT(`jos_app_order_status`.`id`) AS value, order_status_name AS text FROM `jos_app_order_status` AS `jos_app_order_status` WHERE id_contest="1835" ORDER BY text ASC ] => Array

The first query takes out thousands of results, then the second only three results. Since I have dozens of similar fields, the time taken to open the form is over 60 seconds.

Today I can't still update Fabrik, then I would prefer to change only the code necessary. I planned a major update in a couple of months, but I have to go slow: This site consists of 180 lists with a database of 120 GB. We are entering the Guinness Book of Fabrik?

Thanks
 
I'd have to see the site and enable Fabrik debug mode to see what's happening. It looks like the join's buildQuery() is being called a second time but without "incFilters" set, which doesn't happen in 3.1, and I can't immediately see why it would happen in 3.0.

Note that we really don't support 3.0 development any more, so if this needs some custom coding, we would have to charge on an hourly basis for that.

-- hugh
 

Members online

No members online now.
Back
Top