I save the IPv4 addresses in the column type "int unsigned" with inet_aton. [Am I doing it right? And uses "unsigned" required?] This particular column is also indexed. Since there will be millions of rows and several rows containing the same IP address throughout the table, what would be the fastest way to find these rows?
.. or am I not mistaken about this?
Am I doing it right? And uses "unsigned" necessary?
. unsigned IP- , int ( varchar) .
unsigned
int
varchar
?
, , ( ..). , unsigned int .
inet_aton - , ( 256 3 ). 32- , unsigned int.
int IP-. , , MySQL.
, , , Bad Thing (tm). , , , . nosql , , .
, IP- MySQL.
INET_ATON, , UNSIGNED INT IP- 127 .
It is also a very quick way to search. MySQL handles entire columns perfectly, and by indexing that column and using INET_ATON in your search, you can get very fast queries.
Source: https://habr.com/ru/post/1770578/More articles:Обновить форму пользовательского интерфейса из рабочего потока - vb.netCan ASP.NET MVC return javascript response like Ruby on Rails? - ajaxThe form is not updated after the launch of a special event of the class - multithreadingДоступ к элементам управления между формами - vb.netDifference between AddLoadEvent and jQuery load function - functionfatal error LNK1107 when generating the lib file from vlc dll - dllDynamically Distributed Array Extension - c ++Insert elements into an array - arraysText does not display fully in JTextField - javaA table in SQL Server will not return more than a few thousand rows - tsqlAll Articles