~/talk

Understanding Advanced Datatypes in PostgreSQL

Talkat PGConf Silicon Valley 2016 · 2016-11-14..11-16· [databases]
links:none on file
slides:none on file

Use bigserial or UUID for surrogate keys (create the uuid-ossp extension if needed); prefer text not varchar for strings; default timestamps to timestamp with time zone; store semi-structured data as JSONB not JSON. Create functional indexes (e g reverse(email)) and GIN indexes on arrays or tsvector for fast lookups. Toast moves values out of row at roughly 2KB, so avoid scanning large blobs; use range types plus exclusion constraints for time intervals and PostGIS or ip4r extensions for geo and network work.

AI-written summary · about

  1. 0:00Intro
  2. 1:24Basic types surrogate keys
  3. 5:53Text: Use indexes for pattern- matching An index supports prefixes (LIKE 'Peters)
  4. 11:22Time travel: interval
  5. 12:07Boolean values
  6. 12:32Binary data
  7. 13:20Don't use
  8. 16:00Internals: What's a type?
  9. 17:12Internals: How does it work?
  10. 19:36Internals: TOAST is great
  11. 22:26Internals: Make TOAST faster
  12. 23:59Advanced types greatest hits
  13. 24:23Array: What?
  14. 29:18JSON(b): jsonb vs json
  15. 33:32Enums: How?
  16. 34:24Ranges: What?
  17. 35:18Ranges: How? (Basics)
  18. 36:21Ranges: How? (Window functions)
  19. 38:25Email Addresses
  20. 38:54emailaddr
  21. 40:07Skip the migration!
  22. 40:24Geometry: What?
  23. 40:42PostGIS: What?
  24. 41:54Network addresses
  25. 42:15Physical Units
  26. 45:05Domains: Examples
  27. 45:23Domains & Arrays
  28. 45:42Composite Types: How? (1/2)
  29. 46:19DIY functions
  30. 46:44DIY Operators
  31. 47:57Images
  32. 48:36Basic data types to use
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.