dutchklion.blogg.se

The geodist database
The geodist database




the geodist database

(integer) 1 (3) Statistical operation, count the number of days of punching 127.0.0.Soledad Zignago is a Senior Research Economist, in charge of research communication at the DG Economics and International Relations. Monday: 1, Tuesday: 1, Wednesday: 0 Thursday 0 Friday 1 Saturday 1 Sunday 1 (1) Setting value 127.0.0.1:6379> setbit sing 1 1 Statistics of user information, active, inactive, login, for login, check-in, 365 check-in! Both states can use bitmapsīitmaps bitmaps, data structures are all recorded by operating binary bits, there are only two states of 0Īnd 1, 365=365 bit 1 byte=8 bit 46 bytes or so! If set or other data types are not allowed bitmap (bit storage) two states If fault-tolerant statistics are allowed, hyperloglog can be used Our purpose is to count, instead of saving If a large number of user ids are maintained, it will be troublesome. Traditional way, the set protects the user's id, and its elements are not repeated, and then the number of elements in the set can be counted as a standard to judge Web page from the memory point of view (one person visits a website many times, but still counts In the Redis hyperloglog cardinality statistics algorithmĪdvantages: The memory occupation is fixed, 2^64 different elements count, only 12kb of memory is required, if you want to compare the uv of the hyperloglog preferred The underlying implementation principle of GEO is actually Zset! We can use the Zset command to operate geo View all element information in the map Remove the element pointed to in the map 127.0.0.1:6379> zrange china:city 0 -1 # 查看地图中所有的元素信息ġ27.0.0.1:6379> zrem china:city beijing # 移除地图中指的元素ģ) "tianjin" Hyperloglog cardinality statisticsĬardinality (non-repeating elements) = 5, the error is acceptable The command will return 11 strings Geohash strings 127.0.0.1:6379> geohash china:city hangzhou beijing (error) ERR invalid longitude,latitude pair 117.000000,21212.000000 (2) geodist distance between two people Rules : Two levels cannot be added directly. Some test data can be queried: latitude and longitude query - coordinate picking system Redis' Geo was launched in reids 3.2, and (3) Statistical operation, count the number of days of punchingįriends positioning, nearby people, taxi distance technology, this function can calculate geographic location information, the distance between two places, and people within a radius of a few miles! (6) geohash returns the geohash representation of one or more position elements (5) georadiusbymember finds other elements around the specified element (4) georadius takes the given latitude and longitude as the center, and finds the element of a certain radius (3) geopos gets the current positioning: it must be a coordinate value






The geodist database