Loading README.md +4 −1 Original line number Diff line number Diff line # AIS Postgres Base de datos PostgreSQL para almacenar datos AIS. La tabla principal está particionada por tiempo, de esta forma sólo se accede agiliza las búsquedas que impliquen consultas por fechas. rootfs/docker-entrypoint-initdb.d/vessel.sh +5 −0 Original line number Diff line number Diff line Loading @@ -78,4 +78,9 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-E UPDATE partman.part_config SET infinite_time_partitions = true; SELECT cron.schedule('@${INTERVAL}', \$\$SELECT partman.run_maintenance_proc(p_analyze := false)\$\$) CREATE VIEW ais.last_20m AS SELECT DISTINCT ON (mmsi) * FROM ais.location WHERE tstamp > current_timestamp - interval '20 minutes' ORDER BY mmsi, tstamp DESC; EOSQL No newline at end of file Loading
README.md +4 −1 Original line number Diff line number Diff line # AIS Postgres Base de datos PostgreSQL para almacenar datos AIS. La tabla principal está particionada por tiempo, de esta forma sólo se accede agiliza las búsquedas que impliquen consultas por fechas.
rootfs/docker-entrypoint-initdb.d/vessel.sh +5 −0 Original line number Diff line number Diff line Loading @@ -78,4 +78,9 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-E UPDATE partman.part_config SET infinite_time_partitions = true; SELECT cron.schedule('@${INTERVAL}', \$\$SELECT partman.run_maintenance_proc(p_analyze := false)\$\$) CREATE VIEW ais.last_20m AS SELECT DISTINCT ON (mmsi) * FROM ais.location WHERE tstamp > current_timestamp - interval '20 minutes' ORDER BY mmsi, tstamp DESC; EOSQL No newline at end of file