John Aleman

Podcast network

Episode Board

One show, read through a service and a Drizzle repository. The board below is cached and tagged; the panel underneath runs the same read two ways and counts the statements each one sends.

Midnight Signal

Sci-fi drama · produced by Marisol Vega · 25% complete

  • S1E1 · The Static Before Dawn

    Dev Patel

    Recorded
  • S1E2 · A Voice From Tuesday

    Hanne Olsen

    Draft
  • S1E3 · Dead Air

    Marisol Vega

    Draft
  • S1E4 · Frequency Shift

    Hanne Olsen

    Published
  • S1E5 · The Night Log

    No editor

    Draft
  • S1E6 · Signal Fade

    Marisol Vega

    Recorded
  • S1E7 · Echo Chamber

    Dev Patel

    Published
  • S1E8 · Last Transmission

    Dev Patel

    Draft

Board revision 1 — built by 2 statements, cached under the tag show

Same read, two strategies

Naive

select() with no fields, no limit, and a lookup inside a loop.

Statements
10
Rows
17
Values
77
  1. select
      "id",
      "name",
      "genre",
      "description",
      "producer_id"
    from "shows"
    where "shows"."id" = $1
  2. select
      "id",
      "name"
    from "producers"
    where "producers"."id" = $1
  3. select
      "id",
      "show_id",
      "editor_id",
      "title",
      "status",
      "notes",
      "updated_at"
    from "episodes"
    where "episodes"."show_id" = $1

+ 7 more statements, one per episode with an editor

Selective

Named fields, a join, a filter, an ordering and a limit.

Statements
2
Rows
9
Values
36
  1. select
      "shows"."id",
      "shows"."name",
      "shows"."genre",
      "producers"."name"
    from "shows"
    inner join "producers" on "shows"."producer_id" = "producers"."id"
    where "shows"."id" = $1
    limit $2
  2. select
      "episodes"."id",
      "episodes"."title",
      "episodes"."status",
      "producers"."name"
    from "episodes"
    left join "producers" on "episodes"."editor_id" = "producers"."id"
    where "episodes"."show_id" = $1
    order by "episodes"."updated_at" desc
    limit $2

Both return the same board. Statements are round trips to Postgres; values are rows × columns pulled over the wire.