GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - De-Qua/dq_sql: Magical real-time suggestions ready for you

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
functions
functions
 
 
utils
utils
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
compose.override.yml
compose.override.yml
 
 
compose.prod.yml
compose.prod.yml
 
 
compose.yml
compose.yml
 
 

Repository files navigation

dq_sql

Magical real-time suggestions ready for you.

Now also the getNearby.. family of functions is available.

Just run sh create_functions.sh and all functions will be added (I hope)

Set up the Database

To start a freshly new database:

  1. Start the postgres container
docker compose up -d

It will automatically create the databases with postgis extensions in some of them

  1. From the main flask folder run the alembic upgrade
flask db upgrade

Or if the backend is the containerized docker version

docker compose run --rm dq_backend flask db upgrade

Or if in development with multiple yml files

docker compose -f docker-compose.yml -f docker-compose.dev.yml run --rm dq_backend flask db upgrade

This will create all the tables and relationships

  1. From the db folder restore all the data
./restore_data.sh

It will restore all the data

If you want to dump all the data it is necessary to dump with the data-only flag! Otherwise there are problems with alembic since it will delete and recreate all the tables! If you want you can run the script

./backup_data.sh

which will dump all the data of the different databases in the folder db_dump!

Evviva!

The magical INDEX

To optimize queries, you can create the index. For example, the getNearbyStreets function works much faster (~10x in our quick experiments) after creating the relative index, with:

CREATE INDEX ON public.street using gist (shape);

We are still studying whether it makes sense to create other indices on other tables. We created also on locations (CREATE INDEX ON public.location using gist (shape);) but it did not help much on the getNearbyAddresses function.

About

Magical real-time suggestions ready for you

Resources

Readme
AGPL-3.0 license
Activity
Custom properties

Stars

0 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.