id,node_id,number,state,locked,title,user,body,created_at,updated_at,closed_at,merged_at,merge_commit_sha,assignee,milestone,draft,head,base,author_association,repo,url,merged_by,auto_merge 1220379312,PR_kwDOBm6k_c5IvYKw,2008,open,0,array facet: don't materialize unnecessary columns,193185,"The presence of `inner.*` causes SQLite to materialize a row with all the columns. Those columns will be discarded later. Instead, we can select only the column we'll use. This lets SQLite's optimizer realize that the other columns in the CTE definition aren't needed. On a test table with 278K rows, 98K of which had an array, this speeds up the facet calculation from 4 sec to 1 sec. ---- :books: Documentation preview :books:: https://datasette--2008.org.readthedocs.build/en/2008/ ",2023-01-28T19:33:40Z,2023-01-29T18:17:40Z,,,0eda5a57ead9bda8be4c9e5cd2fdb9f22e69222e,,,0,f529a3001d35a114d2e622dcc7913c4c25a95ed8,0b4a28691468b5c758df74fa1d72a823813c96bf,CONTRIBUTOR,107914493,https://github.com/simonw/datasette/pull/2008,,