Page 1 of 1

Optimizing Query

Posted: Thu Jan 31, 2019 9:18 pm
by Shahryar_NEO
Dear FlexBanner Developer,

First of all thanks for your amazing product.

We're running a website with heavy traffic and your banners with impressions and click tracking has a query like this:

UPDATE `w3m84_flexbanners` SET `clientid`='1',`linkid`='2',`sizeid`='17',`imageurl`='-1',`imagealt`='XXX',`customcode`='',`restrictbyid`='0',`frontpage`='1',`clicks`='72202',`impmade`='83919868',`startdate`='0000-00-00 00:00:00',`enddate`='0000-00-00 00:00:00',`maximpressions`='0',`maxclicks`='0',`dailyimpressions`='176633',`lastreset`='2019-01-31',`state`='1',`finished`='0',`checked_out`='0',`checked_out_time`='0000-00-00 00:00:00',`locationid`='2',`type`='3',`name`='بنر پنج',`flash`='',`cloud_imageurl`='https://www.sample.com/images/1.gif',`published`='0',`catid`='219',`ordering`='5',`created`='2017-05-29 10:29:42',`language`='*',`newwin`='1',`modified`='2018-12-03 17:52:49',`modified_by`='2689',`version`='7' WHERE `id`='5'

The query is not optimized and when you have near 1000 active users in real time, It'll make a huge burden on MySQL Server for some banners. Please optimize it in the new version and quick support is highly appreciated by donation for being grateful of your amazing product.

Another question, If we enable Caching for your modules, They will not count impressions and clickrate correctly?


Thanks,
Shahryar

Re: Optimizing Query

Posted: Fri Feb 01, 2019 8:50 am
by Andrew998
I will take a look although most of my effort, at present, is looking at getting FlexBanners ready for Joomla 4.

The component should still count correctly with caching.

Re: Optimizing Query

Posted: Thu Feb 07, 2019 5:37 pm
by Andrew998
Attached is a file for you to try. Plese extract and upload it to the modules/mod_flexbanners directory to see if it helps. I'm assuming it deals with the query you meant rather than the one you showed (which is a very simple query).

Please let me know if it helps you.