does anyone happen to be a geolocation pro? im trying to figure out if ip addresses follow rules such that i could geolocate on only, eg the first two blocks of an ip address -- to just get a narrowed down location, like the country or even continent of origin like 71.59.66.61 -> 71.59.xx.xx -> USA
basically i want to bin these ips in some way that reduces the number of geolocation calls I have to make
because i have 500k or so
(analysing activity logs to find regional patterns)
seems like its not that simple
@idiomancy Definitely no simple patterns, Iām afraid. We have a huge database of IP ranges to locations, and we also use https://ipinfo.io to supplement that.
I had a java lib somewhere that did a rough lookup
yeah i ended up grabbing a free databaae, loading it up locally into a dataframe, and left outer joining it to my ip list, which i quantized into nearest "allocated ip range for country" cutoff
a fun day because
update a = null,
b = (case a ...)
where a is not null
in postgres and h2 uses the pre-updated version of a (ie, before it is "set" to null) whereas mysql uses the updated version of a so its null in the case statementSo thanks to everyone who works on transaction consistency and fighting tearing reads
mysql is wrong
i agree and i didn't like it
and it took a while to track down why it could be failing. and it "works" if you select because there's no overwriting. which makes it even harder to diagnose lol
ie select what your update will do rather than actually set things
it might also depend on your mysql settings and if you're using InnoDB? https://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-isolation-levels.html
quite possibly. locally its just brew install and let 'er rip. but that is what customer environments could look like as well. but was just super surprising and did not endear mysql to me