Has vacuum analyze been run on both recently? What is the maximum number
of rows with a particular stream value, and how many does each of 1 and 2
actually have?
> Interestingly, the sequential scan on playlist claims to be returning 2000
> results for stream=1 and only 200 for stream=2. I'm not sure which part of
> the where clause this guess comes from, because the playlist table has
> equal numbers of entries for both streams.