We don't use the hide, unpublish and archive function for records.
The record count query depends on some section parameters like "Who can see future articles" or "Who can see expired articles".
SELECT COUNT(*)
FROM hsb0a_js_res_record AS r
WHERE r.section_id = 2
AND r.ctime < '2013-08-04 06:39:21'
AND (r.extime = '0000-00-00 00:00:00' OR r.extime > '2013-08-04 06:39:21')
AND r.archive = 0
AND r.published = 1
AND r.hidden = 0
Some additional parameters would allow users to set a faster environment based on their requirements. In our example we would exclude publish, hidden and archive from the query and set future articles and expired articles to public.
This should leave a query like:
SELECT COUNT(*)
FROM hsb0a_js_res_record AS r
WHERE r.section_id = 2
The default query now is 211ms.
But with the new setting, it could be 17ms ...
We don't use the hide, unpublish and archive function for records.
The record count query depends on some section parameters like "Who can see future articles" or "Who can see expired articles".
Some additional parameters would allow users to set a faster environment based on their requirements. In our example we would exclude publish, hidden and archive from the query and set future articles and expired articles to public.
This should leave a query like:
The default query now is 211ms.
But with the new setting, it could be 17ms ...