Add SQL function to create geom/datetime indexes when creating a new Table in the public schema
@bitner is already working on this.
Since May 5, 2023.
Assessment
This issue has not been assessed yet.
Description
eoAPI is built on top a Postgres database that has a pgSTAC schema but also a public one we can use to store other geo data. We don't have a service to ingest data but I think it will be cool to create a simple SQL script to automatically create INDEX on any geometry and datetime column so eoapi.vector is fast.
CREATE OR REPLACE FUNCTION on_create_table_func()
RETURNS event_trigger AS $$
BEGIN
-- find geom/datetime column
-- add indexes
END
$$
LANGUAGE plpgsql;
CREATE EVENT TRIGGER
on_create_table ON ddl_command_end
WHEN TAG IN ('CREATE TABLE')
EXECUTE PROCEDURE on_create_table_func();
The function and trigger should be used in https://github.com/developmentseed/eoAPI/blob/019e4b56cbfe5919883833a3656c28ba6ad3375e/infrastructure/aws/handlers/db_handler.py#L268
cc @bitner
- Dominant language
- JavaScript
- Stars
- 339
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from developmentseed/eoAPI
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
developmentseed/eoAPI#236 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
developmentseed/eoAPI#224 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 70/100
developmentseed/eoAPI#190 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
developmentseed/eoAPI#215 · 1 reaction ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
developmentseed/eoAPI#191 · 1 comment · 1 reaction ·
All issues in developmentseed/eoAPI
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
PranshulGG/WeatherMaster#1266 · 3 comments ·
Maintainers usually reply within 1 day
-
FEATURE REQUEST
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
linuxmint/cinnamon-spices-applets#9356 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
opnsense/plugins#5976 · 1 comment ·
Maintainers usually reply within 1 day
-
os.networkInterfaces() can throw and crash the process when listening on 0.0.0.0Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day