[Phpmyadmin-devel] #4070 Confusing database/table grouping
hugues.peccatte at gmail.com
Tue Apr 15 21:18:12 CEST 2014
I would like to talk about this ticket:
The issue is that when you want to limit the number of items (last
level) by page in navigation tree, you can have an issue with the last
Imagine that you set the config to 25 items, you have a first group of 20
DB, and another one of 15 DB. Here, the last group will contain only 5
items and not all the group. But there is no information that there is
other children of this group, so you can believe that you see all the items
of the group.
I think that we better have to filter on the first level, than on the
number of the last level items…
The list of DB could be get by one query:
from INFORMATION_SCHEMA.SCHEMATA s,
SELECT SCHEMA_NAME, SUBSTRING_INDEX(SCHEMA_NAME, '_', 1) DB_first_level
ORDER BY DB_first_level ASC
LIMIT 1, 3
where 1 = locate(concat(DB_first_level, '_'), concat(s.SCHEMA_NAME, '_'))
order by s.SCHEMA_NAME;
(Here, I assume that the first level separator is "_" and that we want 3
items of first level.)
(If someone has basics of optimisation and have some idea to improve this
query, it could be useful.)
What do you think about removing limit number of last level items and
replace it by a limit of first level items?
Or any idea to fix the issue in another way?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Developers