Monday, November 26, 2018
Sunday, November 25, 2018
PostgreSQL & Homebrew
https://stackoverflow.com/questions/15301826/psql-fatal-role-postgres-does-not-exist
If you're using postgres from Homebrew, then you want
If you're using postgres from Homebrew, then you want
/usr/local/Cellar/postgresql/9.2.4/bin/createuser -s postgres (for version 9.2.4, obviously). Saturday, November 24, 2018
Thursday, November 22, 2018
Database Indexes - How to determine if an Index is required or not
https://dba.stackexchange.com/questions/56/how-to-determine-if-an-index-is-required-or-necessary
http://blog.celerity.com/how-to-design-sql-indexes
http://blog.celerity.com/how-to-design-sql-indexes
22/08/2017, 19:03:36B-Trees in databases are not binary trees, they are BALANCED trees
Tuesday, November 20, 2018
UUID related
Seems like an exercise in trying to hack something using UUID guessing -
https://medium.com/@evinsellin/communicating-through-uuid-conflicts-fe50134304dbElectron, Desktop PWAs
Medium article:
https://medium.com/dailyjs/goodbye-electron-hello-desktop-pwas-f316b8f39882
YouTube video:
https://medium.com/dailyjs/goodbye-electron-hello-desktop-pwas-f316b8f39882
YouTube video:
Sunday, November 18, 2018
Saturday, November 17, 2018
Sunday, November 11, 2018
Friday, November 9, 2018
Wednesday, November 7, 2018
Database related - Composite Indexes
How do composite indexes work - https://stackoverflow.com/questions/795031/how-do-composite-indexes-work
https://stackoverflow.com/a/795068
https://stackoverflow.com/a/795068
Composite indexes work just like regular indexes, except they have multi-values keys.
If you define an index on the fields (a,b,c) , the records are sorted first on a, then b, then c.
Example:
| A | B | C |
-------------
| 1 | 2 | 3 |
| 1 | 4 | 2 |
| 1 | 4 | 4 |
| 2 | 3 | 5 |
| 2 | 4 | 4 |
| 2 | 4 | 5 |
- 12 Please note also that indexes are stored as Btree, so an (a,b,c) index will help on a search on (a) and on (a, b),
"MySQL can use multiple-column indexes for queries that test all the columns in the index, or queries that test just the first column, the first two columns, the first three columns, and so on. If you specify the columns in the right order in the index definition, a single composite index can speed up several kinds of queries on the same table." - Multiple-Column Indexes – AlikElzin-kilaka Sep 9 at 4:46
https://stackoverflow.com/questions/2349817/two-single-column-indexes-vs-one-two-column-index-in-mysql
https://stackoverflow.com/questions/179085/multiple-indexes-vs-multi-column-indexes?rq=1
https://stackoverflow.com/questions/2349817/two-single-column-indexes-vs-one-two-column-index-in-mysql
https://stackoverflow.com/questions/179085/multiple-indexes-vs-multi-column-indexes?rq=1
MIPA