Skip to content

Finalize DB Index and JavaScript Rules Meeting Minutes

Meeting Info

Date 2022-06-24
Topic Finalize DB Index and JavaScript Rules
Attendee Calvin Yan, Selly Huang, Rocky Chi, Daniel Zhou, Ted Zhao, Jackson Liu, Albert Wang
Note Taker Daniel Zhou
Timer Albert Wang
Duration 40 minutes

Meeting Agenda

  1. Discussion on DB Index Rules (20 minutes)
  2. Discussion on JavaScript Rules (20 minutes)

Meeting Minutes / Action Items:

Finalize DB Index and JavaScript Rules

  • DB index rule survey result (marked): db-index-rule
  • JavaScript rule survey result (see percent value): javascript-rule1 javascript-rule2 javascript-rule3
  • Results for controversial DB Index Rules:
Rule Name Result Comments
Won't forbid to use join if the joined tables are more than three and business needed. Columns to be joined MUST be with absolutely same data types. And make sure that columns to be joined are indexed Recommend
The last columns of ORDER BY clauses should be at the end of a composite index. Recommend MySQL has this requirement and we need to check if PostgreSQL has same requirement as well.
Make use of Covering Index for query to avoid additional query after searching index. Recommend MySQL has such a situation and we need to check if PostgreSQL has same situation.
The target of SQL performance optimization should AVOID these result types of EXPLAIN. Recommend We need to take care if we will need to use index for related columns which exist implicit type conversion.

Action Output

  1. Best practice - enable slow query log in DB and analyze some slow sql queries, then fix them.