$30 off During Our Annual Pro Sale. View Details »

Faster Queries = More Animal Crossing

Faster Queries = More Animal Crossing

A quick walkthrough of common query inefficiencies using PostgreSQL and TimescaleDB.

Jonan Scheffler

March 31, 2020
Tweet

More Decks by Jonan Scheffler

Other Decks in Programming

Transcript

  1. FASTER QUERIES
    = MORE ANIMAL CROSSING

    View Slide

  2. @thejonanshow

    View Slide

  3. @thejonanshow

    View Slide

  4. @thejonanshow

    View Slide

  5. @thejonanshow

    View Slide

  6. @thejonanshow

    View Slide

  7. @thejonanshow

    View Slide

  8. @thejonanshow

    View Slide

  9. @thejonanshow

    View Slide

  10. @thejonanshow

    View Slide

  11. @thejonanshow

    View Slide

  12. @thejonanshow

    View Slide

  13. @thejonanshow

    View Slide

  14. @thejonanshow

    View Slide

  15. @thejonanshow

    View Slide

  16. @thejonanshow

    View Slide

  17. @thejonanshow

    View Slide

  18. @thejonanshow

    View Slide

  19. @thejonanshow

    View Slide

  20. @thejonanshow

    View Slide

  21. @thejonanshow

    View Slide

  22. @thejonanshow

    View Slide

  23. @thejonanshow

    View Slide

  24. @thejonanshow

    View Slide

  25. @thejonanshow

    View Slide

  26. @thejonanshow

    View Slide

  27. @thejonanshow

    View Slide

  28. @thejonanshow

    View Slide

  29. @thejonanshow

    View Slide

  30. @thejonanshow

    View Slide

  31. @thejonanshow

    View Slide

  32. @thejonanshow

    View Slide

  33. @thejonanshow

    View Slide

  34. @thejonanshow
    - Common Table Expressions slow down small queries

    View Slide

  35. @thejonanshow
    - Common Table Expressions slow down small queries
    - LIKE and ILIKE dodge indexes, use pg_trgm

    View Slide

  36. @thejonanshow
    - Common Table Expressions slow down small queries
    - LIKE and ILIKE dodge indexes, use pg_trgm
    - Types matter, avoid letting the planner cast values for you

    View Slide

  37. @thejonanshow
    Thank You!

    github.com/timescale/wikistream-docker

    View Slide