#4070 (ok 4.2.0-rc1) Confusing database/table grouping

navigation (12)

Database groupping can be confusing if the last node in navigation frame is grouped - there is group, but when you unfold it, some databases are not there as they did not fit into the whole page limit. I think in this case the limit should be simply ignored as having not complete group is quite confusing.


  • Michal Čihař

    Michal Čihař - 2013-08-27
    • labels: --> navigation
  • Marc Delisle

    Marc Delisle - 2013-09-14
    • summary: Confusing database/table groupping --> Confusing database/table grouping
  • Hugues Peccatte

    Hugues Peccatte - 2014-03-30

    Could we imagine that variable $cfg['MaxNavigationItems'] define the number of elements of first level?
    Or should it really define the max number of elements of last level on each page?

    If it defines the number of elements of first level, so we could imagine that each group is completely displayed, and not only the X first elements not to exceed the limit.

    Create the following DB:

    So the groups should be:
    - 1
    -- 1
    -- 2
    -- 3
    - 2
    -- 1
    -- 2
    -- 3

    With $cfg['MaxNavigationItems'] = 2; I think that we should display all the group test, not only test_1_1 and test_1_2.
    That's right that's confusing not to see all the DB of a group on the same page.

  • Marc Delisle

    Marc Delisle - 2014-04-01

    I would rather create a new configuration directive that describes the number of first level elements.

  • Hugues Peccatte

    Hugues Peccatte - 2014-04-04

    Ok, but that won't solve the issue of groups that are partially displayed.
    Or maybe you have an idea to solve this issue with the 2 variables?
    Thanks for your help.

  • Marc Delisle

    Marc Delisle - 2014-04-05

    you are right, a new directive would not help the grouping problem by itself.

    MaxNavigationItems is used at each level. For example, setting it to 5
    will limit the number of tables per page, and the number of columns.
    The developer of this feature had set it to 25. It was increased to 250
    in https://github.com/phpmyadmin/phpmyadmin/commit/c921f6f807f3cc0e8df8144a883f80858481275f as a partial workaround for the
    grouping problem; however, it might be too much to see 250 tables per page
    for one database, in the navi panel.

    The problem is that this directive is used in a LIMIT clause on a SELECT
    statement that has no clue about database grouping.

  • Hugues Peccatte

    Hugues Peccatte - 2014-04-06

    Could we imagine not to use this directive any more and create a new one to manage the number of elements of first level?

  • Marc Delisle

    Marc Delisle - 2014-04-07

    And remove the possibility of limiting at lower levels? Please discuss this on the phpmyadmin-devel list.

  • Hugues Peccatte

    Hugues Peccatte - 2014-04-13

    I'll try to talk about it on devel list, but first, here is a clue to limit first level items, if someone wants to work on it:
    select s.*
    select DB_first_level
    from (
    ) t
    ORDER BY DB_first_level ASC
    LIMIT 1, 3
    ) t2
    where 1 = locate(concat(DB_first_level, '_'), concat(s.SCHEMA_NAME, '_'))
    order by s.SCHEMA_NAME;

    Here, I assume that DB separator is "_" and that we want 3 items on first level.

  • Marc Delisle

    Marc Delisle - 2014-04-13

    have you tested the performance of this kind of query with MySQL 5.5 or later, and hundreds or thousands of databases?

  • Hugues Peccatte

    Hugues Peccatte - 2014-04-14

    Not at all… I'll see if I can test it.

  • Hugues Peccatte

    Hugues Peccatte - 2014-04-15

    I tested it on a server with 182 DB. The query give me 15 lines in 0.0028s.
    This seems to be acceptable to me.

  • Marc Delisle

    Marc Delisle - 2014-04-24
    • summary: Confusing database/table grouping --> (ok 4.2.0-rc1) Confusing database/table grouping
    • status: open --> resolved
    • assigned_to: Hugues Peccatte
    • Priority: 5 --> 1
  • Marc Delisle

    Marc Delisle - 2014-05-08
    • status: resolved --> fixed