add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
CREATE TABLE
INSERT 0 7
CREATE TABLE
INSERT 0 6
id title genre aspect_ratio format
1 Saw horror 2.39 35mm
2 Smile horror 1.85 digital
3 Nosferatu horror 2.39 35mm
4 Alien horror 1.85 35mm
5 Nope horror 2.39 digital
6 Comedy-1 comedy 2.39 digital
7 Comedy-2 widescreen comedy 3.85 digital
SELECT 7
id title jsonb_structure
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]}
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]}
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]}
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]}
5 Widescreen comedy {"genre":["comedy"],"aspect_ratio":["3.85","2.39"]}
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]}
SELECT 6
cid ctitle mid mtitle attrkeys attrcount dcnt2 attrcnt
1 Widescreen Horror Movies 1 Saw aspect_ratio,genre 2 2 2
1 Widescreen Horror Movies 3 Nosferatu aspect_ratio,genre 2 2 2
1 Widescreen Horror Movies 5 Nope aspect_ratio,genre 2 2 2
2 Widescreen digital Films 5 Nope aspect_ratio,format 2 2 2
2 Widescreen digital Films 6 Comedy-1 aspect_ratio,format 2 2 2
3 AllAspect digital Films 2 Smile aspect_ratio,format 2 2 2
3 AllAspect digital Films 5 Nope aspect_ratio,format 2 2 2
3 AllAspect digital Films 6 Comedy-1 aspect_ratio,format 2 2 2
4 AllAspect comedy 6 Comedy-1 aspect_ratio,genre 2 2 2
5 Widescreen comedy 6 Comedy-1 aspect_ratio,genre 2 2 2
5 Widescreen comedy 7 Comedy-2 widescreen aspect_ratio,genre 2 2 2
6 35mm horror 1 Saw aspect_ratio,format,genre 3 3 3
6 35mm horror 3 Nosferatu aspect_ratio,format,genre 3 3 3
6 35mm horror 4 Alien aspect_ratio,format,genre 3 3 3
SELECT 14
cid ctitle attrlist attr attrvalue mid mtitle mgenre maspect_ratio mformat attrcnt
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} genre ["horror"] 1 Saw horror 2.39 35mm 2
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} genre ["horror"] 2 Smile horror 1.85 digital 2
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} genre ["horror"] 3 Nosferatu horror 2.39 35mm 2
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} genre ["horror"] 4 Alien horror 1.85 35mm 2
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} genre ["horror"] 5 Nope horror 2.39 digital 2
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} aspect_ratio ["2.39"] 1 Saw horror 2.39 35mm 2
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} aspect_ratio ["2.39"] 3 Nosferatu horror 2.39 35mm 2
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} aspect_ratio ["2.39"] 5 Nope horror 2.39 digital 2
1 Widescreen Horror Movies {"genre":["horror"], "aspect_ratio":["2.39"]} aspect_ratio ["2.39"] 6 Comedy-1 comedy 2.39 digital 2
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]} aspect_ratio ["2.39"] 1 Saw horror 2.39 35mm 2
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]} aspect_ratio ["2.39"] 3 Nosferatu horror 2.39 35mm 2
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]} aspect_ratio ["2.39"] 5 Nope horror 2.39 digital 2
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]} aspect_ratio ["2.39"] 6 Comedy-1 comedy 2.39 digital 2
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]} format ["digital"] 2 Smile horror 1.85 digital 2
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]} format ["digital"] 5 Nope horror 2.39 digital 2
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]} format ["digital"] 6 Comedy-1 comedy 2.39 digital 2
2 Widescreen digital Films {"aspect_ratio":["2.39"], "format":["digital"]} format ["digital"] 7 Comedy-2 widescreen comedy 3.85 digital 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} aspect_ratio ["1.85","2.39"] 1 Saw horror 2.39 35mm 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} aspect_ratio ["1.85","2.39"] 2 Smile horror 1.85 digital 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} aspect_ratio ["1.85","2.39"] 3 Nosferatu horror 2.39 35mm 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} aspect_ratio ["1.85","2.39"] 4 Alien horror 1.85 35mm 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} aspect_ratio ["1.85","2.39"] 5 Nope horror 2.39 digital 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} aspect_ratio ["1.85","2.39"] 6 Comedy-1 comedy 2.39 digital 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} format ["digital"] 2 Smile horror 1.85 digital 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} format ["digital"] 5 Nope horror 2.39 digital 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} format ["digital"] 6 Comedy-1 comedy 2.39 digital 2
3 AllAspect digital Films {"aspect_ratio":["1.85","2.39"], "format":["digital"]} format ["digital"] 7 Comedy-2 widescreen comedy 3.85 digital 2
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]} genre ["comedy"] 6 Comedy-1 comedy 2.39 digital 2
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]} genre ["comedy"] 7 Comedy-2 widescreen comedy 3.85 digital 2
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]} aspect_ratio ["1.85","2.39"] 1 Saw horror 2.39 35mm 2
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]} aspect_ratio ["1.85","2.39"] 2 Smile horror 1.85 digital 2
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]} aspect_ratio ["1.85","2.39"] 3 Nosferatu horror 2.39 35mm 2
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]} aspect_ratio ["1.85","2.39"] 4 Alien horror 1.85 35mm 2
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]} aspect_ratio ["1.85","2.39"] 5 Nope horror 2.39 digital 2
4 AllAspect comedy {"genre":["comedy"],"aspect_ratio":["1.85","2.39"]} aspect_ratio ["1.85","2.39"] 6 Comedy-1 comedy 2.39 digital 2
5 Widescreen comedy {"genre":["comedy"],"aspect_ratio":["3.85","2.39"]} genre ["comedy"] 6 Comedy-1 comedy 2.39 digital 2
5 Widescreen comedy {"genre":["comedy"],"aspect_ratio":["3.85","2.39"]} genre ["comedy"] 7 Comedy-2 widescreen comedy 3.85 digital 2
5 Widescreen comedy {"genre":["comedy"],"aspect_ratio":["3.85","2.39"]} aspect_ratio ["3.85","2.39"] 1 Saw horror 2.39 35mm 2
5 Widescreen comedy {"genre":["comedy"],"aspect_ratio":["3.85","2.39"]} aspect_ratio ["3.85","2.39"] 3 Nosferatu horror 2.39 35mm 2
5 Widescreen comedy {"genre":["comedy"],"aspect_ratio":["3.85","2.39"]} aspect_ratio ["3.85","2.39"] 5 Nope horror 2.39 digital 2
5 Widescreen comedy {"genre":["comedy"],"aspect_ratio":["3.85","2.39"]} aspect_ratio ["3.85","2.39"] 6 Comedy-1 comedy 2.39 digital 2
5 Widescreen comedy {"genre":["comedy"],"aspect_ratio":["3.85","2.39"]} aspect_ratio ["3.85","2.39"] 7 Comedy-2 widescreen comedy 3.85 digital 2
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} genre ["horror"] 1 Saw horror 2.39 35mm 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} genre ["horror"] 2 Smile horror 1.85 digital 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} genre ["horror"] 3 Nosferatu horror 2.39 35mm 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} genre ["horror"] 4 Alien horror 1.85 35mm 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} genre ["horror"] 5 Nope horror 2.39 digital 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} aspect_ratio ["1.85","2.39"] 1 Saw horror 2.39 35mm 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} aspect_ratio ["1.85","2.39"] 2 Smile horror 1.85 digital 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} aspect_ratio ["1.85","2.39"] 3 Nosferatu horror 2.39 35mm 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} aspect_ratio ["1.85","2.39"] 4 Alien horror 1.85 35mm 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} aspect_ratio ["1.85","2.39"] 5 Nope horror 2.39 digital 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} aspect_ratio ["1.85","2.39"] 6 Comedy-1 comedy 2.39 digital 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} format ["35mm"] 1 Saw horror 2.39 35mm 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} format ["35mm"] 3 Nosferatu horror 2.39 35mm 3
6 35mm horror {"genre":["horror"],"aspect_ratio":["1.85","2.39"],"format":["35mm"]} format ["35mm"] 4 Alien horror 1.85 35mm 3
SELECT 56