Skip to content

Instantly share code, notes, and snippets.

@Zeitwaechter
Created May 11, 2020 08:11
Show Gist options
  • Select an option

  • Save Zeitwaechter/0c9e198cd0e2a2008e7dd3d5608ad073 to your computer and use it in GitHub Desktop.

Select an option

Save Zeitwaechter/0c9e198cd0e2a2008e7dd3d5608ad073 to your computer and use it in GitHub Desktop.
LaraCon 2018 - Addendum

Taken from Kai Sassnowskis' talk at LARACON EU from 2018 source:

  • Indeces aren't used when using functions (like e.G. YEAR() or MONTH()), use e.G. BETWEEN instead.
  • If not sure what is happening, use an EXPLAIN before your statement.
  • Multi column indeces go from left to right and you can not skip columns, so the defined order in the index matters.
  • An index and a query always have to go together.
  • Inequality Operators: Which query is more important? Is the introduction of another index the right approach?
  • "Indexing is my concern", not of others
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment