Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • Mo0nlight Moderator
    #975240

    Hi.

    I edited the code in your site.

    File : /components/com_jak2filter/models/itemlist.php Line 112-117

    $ifield = 'id, title, alias, catid, published, introtext, video, gallery, extra_fields, created_by, created_by_alias, trash, access, featured, image_caption, image_credits, video_caption, video_credits, hits, params, plugins, language';
            $ifield = 'i.'.str_replace(', ',', i.', $ifield);
            $query = "SELECT DISTINCT {$xf} {$ifield},{$select_group_tags} CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams";
    
            //$query = "SELECT DISTINCT {$xf} i.*,{$select_group_tags} CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams";
    

    Line 1541-1549:

    $searchPattern = $prefix.'"('.implode('|', $refValue).')"';// in category and its children
                                        $likearr=array();
                                        foreach ($refValue AS $rv) {
                                            $likearr[] = 'i.extra_fields LIKE \'%{"id":"'.$fid.'","value":"'.$rv.'"}%\' ';
                                        }
                                        $searchPattern = implode(' OR ', $likearr);
                                        $where[] = '('.$searchPattern.')';
                                        /*$searchPattern = $prefix.'"('.implode('|', $refValue).')"';// in category and its children
                                        $where[] = "(i.extra_fields REGEXP '".$searchPattern."')";*/

    Your site now run faster than before. But it’s still slow for united states options because it contains many children. it will be faster if you can disable some more children.
    Please remember this code only work for this case not work if you will apply it further .

    Regards.

    vernontee Friend
    #976919

    Then its not exactly a solution right.. reason being that there are so many cities and states all over… is there no way you can improve the way its searched for performance

    Mo0nlight Moderator
    #981214

    Hi,

    You can use this solution for now, we will update the performance in upcoming version. Please stayed tune.

    Regards

    vernontee Friend
    #981758

    hi… may i know when the updated version will be out?

    Mo0nlight Moderator
    #988463

    Hi,

    I have tried to query your database with MariaDB (new development of MySQL) And it’s surprising that it’s faster than before. See the time query in the image. The MariaDB got nearly 1 sec.

    If possible, you can consider to install the Mariadb on your host.

    Regards


    1. maria-db
    2. mysql
Viewing 5 posts - 16 through 20 (of 20 total)

This topic contains 19 replies, has 3 voices, and was last updated by  Mo0nlight 8 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum