Comments (5)
SELECT c.*, GROUP_CONCAT(DISTINCT ci.item_id) as item_ids FROM #__zoo_category AS c USE INDEX (APPLICATIONID_ID_INDEX) LEFT JOIN #__zoo_category_item AS ci ON ci.category_id = c.id LEFT JOIN #__zoo_item AS i USE INDEX (MULTI_INDEX2) ON ci.item_id = i.id AND i.state = 1 WHERE c.application_id = 2 AND c.published = 1
limit 2 = 0.2657 sec
limit 20 = 0.3786 sec
limit 100 = 0.3843 sec
from zoo-hacks.
without hacks:
SELECT c.*, GROUP_CONCAT(DISTINCT ci.item_id) as item_ids FROM ukr2y_zoo_category AS c USE INDEX (APPLICATIONID_ID_INDEX) LEFT JOIN ukr2y_zoo_category_item AS ci ON ci.category_id = c.id LEFT JOIN ukr2y_zoo_item AS i USE INDEX (MULTI_INDEX2) ON ci.item_id = i.id AND i.access IN(1, 5) AND i.state = 1 AND( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2018-10-10 18:05:24') AND(i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2018-10-10 18:05:24')WHERE c.application_id = 2 AND c.published = 1 limit 200
limit 20 = 0.5215 sec
limit 200 = 0.4556 sec
from zoo-hacks.
when i replace GROUP_CONCAT(DISTINCT ci.item_id) as item_ids
to "" as item_ids
all fine
and pagination not disappear because public function getItems($published = false, $user = null, $orderby = '')
check if items empty - then they get it in $this->app->table->item->getByCategory
from zoo-hacks.
when i replace
GROUP_CONCAT(DISTINCT ci.item_id) as item_ids
to"" as item_ids
all fine
and pagination not disappear because public functiongetItems($published = false, $user = null, $orderby = '')
check if items empty - then they get it in$this->app->table->item->getByCategory
Thank you for your interest. Do you have a better solution?
from zoo-hacks.
just replace GROUP_CONCAT(DISTINCT ci.item_id) as item_ids
to "" as item_ids
visually no differences on site
from zoo-hacks.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoo-hacks.