我需要存储大量的位置坐标及其时间戳。以下是当前表架构的外观:
User_ID, Location_Coordinate, Timestamp
在连续跟踪每个用户的情况下,将为每个用户生成许多位置坐标。有多个用户。什么是有效存储此类数据的正确方法?
我需要为每个用户检索过去24小时的数据。
答案 0 :(得分:1)
The easiest way is to store it all in a single table with a PostGIS geometry
column for the location. What is "efficient" depends entirely on your application. There are a few things to consider:
Otherwise, there is not much advice that can be given with the limited information that you supply. Edit your question with more details and you will get a more detailed answer.