install postgresql in brew: brew install postgresql
-
start postgresql: "brew services start postgresql"
- after postgresql starts, I can use psql
"brew services stop postgresql"
sudo -u postgres psql: to start postgres
\timing <-- if you want to see timing
Link to all command lines for Postgresql: https://www.geeksforgeeks.org/postgresql-psql-commands/
extra: elementSQL can be online db: https://medium.com/@noogetz/how-to-setup-a-database-with-elephantsql-7d87ea9953d0
ex. great video explaining how I can query data inside of PostgreSQL
link: https://www.youtube.com/watch?v=ufdHsFClAk0&t=723s
npm install pg --> pg has great tool of Client where it will query data from the database I have.
If we have huge data that is taking long time, consider using indexing
ex. CREATE INDEX ON styles (product_id);
Top comments (0)