\set id random(1,10000)

set join_collapse_limit = 14;
set geqo = on;

explain select * from f
    join c0 on (c0.id = f.c0_id)
    join c1 on (c1.id = c0.c1_id)
    join c2 on (c2.id = c1.c2_id)
    join c3 on (c3.id = c2.c3_id)
    join c4 on (c4.id = c3.c4_id)
    join c5 on (c5.id = c4.c5_id)
    join c6 on (c6.id = c5.c6_id)
    join c7 on (c7.id = c6.c7_id)
    join c8 on (c8.id = c7.c8_id)
    join c9 on (c9.id = c8.c9_id)
    join c10 on (c10.id = c9.c10_id)
    join c11 on (c11.id = c10.c11_id)
    join c12 on (c12.id = c11.c12_id)
    join c13 on (c13.id = c12.c13_id)
where f.id = :id;

