Send Netdot-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-users digest..."


Today's Topics:

   1. Re: slow DB query? (Vincent Magnin)


----------------------------------------------------------------------

Message: 1
Date: Tue, 9 Feb 2016 13:37:41 +0000
From: Vincent Magnin <[email protected]>
Subject: Re: [Netdot-users] slow DB query?
To: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Hi Brian,

I migrated my mysql-server 5.1 (RHEL6) to 
MariaDB-Galera-server-5.5.47-1.el6.x86_64, and, I've better results:


MariaDB [netdot]> EXPLAIN SELECT device.id, interface.id, interface.name, 
interface.device, ipblock.id, ipblock.interface, ipblock.address FROM ipblock, 
interface, device WHERE interface.id = ipblock.interface AND device.id = 
interface.device AND device.id = '656' ORDER BY ipblock.address;
+------+-------------+-----------+--------+--------------------+----------+---------+--------------------------+------+-----------------------------+
| id   | select_type | table     | type   | possible_keys      | key      | 
key_len | ref                      | rows | Extra                       |
+------+-------------+-----------+--------+--------------------+----------+---------+--------------------------+------+-----------------------------+
|    1 | SIMPLE      | device    | const  | PRIMARY            | PRIMARY  | 8   
    | const                    |    1 | Using index; Using filesort |
|    1 | SIMPLE      | ipblock   | range  | Ipblock6           | Ipblock6 | 9   
    | NULL                     |  946 | Using index condition       |
|    1 | SIMPLE      | interface | eq_ref | PRIMARY,interface1 | PRIMARY  | 8   
    | netdot.ipblock.interface |    1 | Using where                 |
+------+-------------+-----------+--------+--------------------+----------+---------+--------------------------+------+-----------------------------+
3 rows in set (0.00 sec)

MariaDB [netdot]> SELECT device.id, interface.id, interface.name, 
interface.device, ipblock.id, ipblock.interface, ipblock.address FROM ipblock, 
interface, device WHERE interface.id = ipblock.interface AND device.id = 
interface.device AND device.id = '656' ORDER BY ipblock.address;
+-----+-------+------+--------+-------+-----------+------------+
| id  | id    | name | device | id    | interface | address    |
+-----+-------+------+--------+-------+-----------+------------+
| 656 | 40275 | br0  |    656 | 14565 |     40275 | ************ |
+-----+-------+------+--------+-------+-----------+------------+
1 row in set (0.02 sec)


It seems the bug is no more present on Mysql/MariaDB 5.5


Thank you,


Vincent


------------------------------

_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users


End of Netdot-users Digest, Vol 83, Issue 6
*******************************************

Reply via email to