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? (Brian Candler)


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

Message: 1
Date: Mon, 8 Feb 2016 08:36:20 +0000
From: Brian Candler <[email protected]>
Subject: Re: [Netdot-users] slow DB query?
To: Vincent Magnin <[email protected]>,
        "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed

On 07/02/2016 19:55, Vincent Magnin wrote:
> Hi Brian,
>
>> check the version you're using, and whether it's improved in a newer version 
>> of mysql.
> It's mysql from RHEL6 server package (mysql-server-5.1.73-5.el6_6.x86_64). 
> I'll try to upgrade my install to RHEL7 next week to see if it'll improve 
> this query.
>
>
> mysql> EXPLAIN SELECT '656', interface.id, interface.name, interface.device, 
> ipblock.id, ipblock.interface, ipblock.address FROM ipblock, interface WHERE 
> interface.id = ipblock.interface AND interface.device = '656' order by 
> ipblock.address;
> +----+-------------+-----------+--------+--------------------+---------+---------+--------------------------+---------+----------------+
> | id | select_type | table     | type   | possible_keys      | key     | 
> key_len | ref                      | rows    | Extra          |
> +----+-------------+-----------+--------+--------------------+---------+---------+--------------------------+---------+----------------+
> |  1 | SIMPLE      | ipblock   | ALL    | Ipblock6           | NULL    | NULL 
>    | NULL                     | 3191656 | Using filesort |
> |  1 | SIMPLE      | interface | eq_ref | PRIMARY,interface1 | PRIMARY | 8    
>    | netdot.ipblock.interface |       1 | Using where    |
> +----+-------------+-----------+--------+--------------------+---------+---------+--------------------------+---------+----------------+
> 2 rows in set (0.01 sec)
>
No good; that's still selecting 3.2M rows instead of 176K rows from 
ipblock :-(



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

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


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

Reply via email to