I wrote:
> Tom Lane writes:
>> Andreas Seltenreich <[email protected]> writes:
>>> I've added new grammar rules to sqlsmith and improved some older ones.
>>> This was rewarded with a return of "failed to generate plan" errors.
>>
>> I believe I've dealt with these cases now. Thanks for the report!
>
> I no longer see "failed to build any n-way joins" after pulling, but
> there are still instances of "could not devise a query plan". Samples below.
sorry, I spoke too soon: nine of the former have been logged through the
night. I'm attaching a larger set of sample queries this time in case
that there are still multiple causes for the observed errors.
regards,
Andreas
-- select query||';' from error e
-- where (msg ~~ 'ERROR: failed to build any%')
-- and e.t > now() - interval '8 hours'
-- order by length(query) asc;
select
ref_0.collation_schema as c0
from
(select
sample_0.is_supported as c0
from
information_schema.sql_packages as sample_0 tablesample system (0.8)
where 25 > 15
fetch first 60 rows only) as subq_0
right join information_schema.collations as ref_0
on (subq_0.c0 = ref_0.collation_catalog ),
lateral (select
ref_1.f2 as c0,
ref_1.f1 as c1,
ref_0.collation_name as c2,
ref_0.pad_attribute as c3,
subq_0.c0 as c4,
subq_0.c0 as c5,
subq_0.c0 as c6
from
public.func_index_heap as ref_1
where ref_1.f2 ~ ref_1.f1
fetch first 170 rows only) as subq_1,
lateral (select
sample_8.b as c0,
subq_1.c1 as c1,
sample_8.a as c2
from
public.clstr_tst as sample_8 tablesample system (8.8)
left join public.f_star as sample_9 tablesample bernoulli (7.5)
on (sample_8.a = sample_9.aa )
left join public.rules_log as sample_10 tablesample bernoulli (7)
on (sample_8.b = sample_10.f1 )
where sample_10.tag <> sample_8.c
fetch first 126 rows only) as subq_2
where (ref_0.collation_name is NULL)
or (subq_2.c1 !~ subq_2.c1)
fetch first 56 rows only;
select
subq_16.c4 as c0
from
public.rule_and_refint_t1 as sample_18 tablesample system (9.7)
left join (select
sample_20.xx as c0,
sample_20.xx as c1
from
public.inhf as sample_20 tablesample bernoulli (1)
where sample_20.xx is not NULL) as subq_11
inner join public.main_table as sample_25 tablesample system (1.2)
inner join (select
sample_26.b as c0,
subq_15.c1 as c1,
subq_15.c0 as c2,
32 as c3,
subq_15.c0 as c4
from
public.dropcolumn as sample_26 tablesample system (7.6) ,
lateral (select
sample_27.t as c0,
sample_26.b as c1
from
public.radix_text_tbl as sample_27 tablesample system (4.6)
where (sample_26.b is not NULL)
and (sample_27.t ~~ sample_27.t)) as subq_15
where subq_15.c0 !~ subq_15.c0) as subq_16
on (sample_25.b = subq_16.c0 )
on (subq_11.c0 = subq_16.c2 )
on (sample_18.id1a = sample_25.a ),
lateral (select
subq_16.c3 as c0,
subq_17.c1 as c1,
sample_18.id1a as c2,
coalesce(subq_16.c0, subq_16.c1) as c3
from
public.rtest_vcomp as ref_21,
lateral (select
sample_28.a as c0,
ref_21.size_in_cm as c1,
subq_11.c0 as c2,
sample_18.id1a as c3
from
public.tab1 as sample_28 tablesample system (8.2)
where subq_11.c1 <= sample_28.b
fetch first 111 rows only) as subq_17
where ref_21.size_in_cm is NULL
fetch first 101 rows only) as subq_18
where subq_11.c0 ~>=~ subq_11.c1
fetch first 94 rows only;
select
subq_33.c0 as c0,
subq_33.c0 as c1
from
(select
sample_95.y as c0,
sample_95.z as c1
from
public.check2_tbl as sample_95 tablesample system (5.1)
where sample_95.y = sample_95.y) as subq_28
right join pg_catalog.pg_user as ref_101
on (subq_28.c0 = ref_101.passwd )
left join pg_catalog.pg_opfamily as sample_96 tablesample bernoulli (9.8)
on (ref_101.usesysid = sample_96.opfmethod ),
lateral (select
subq_31.c0 as c0,
sample_97.e as c1,
sample_97.e as c2
from
public.dropcolumnchild as sample_97 tablesample system (2.4) ,
lateral (select
subq_30.c0 as c0
from
public.random_tbl as sample_98 tablesample system (8.4) ,
lateral (select
subq_28.c1 as c0,
subq_28.c0 as c1,
subq_28.c1 as c2,
sample_97.e as c3
from
public.undroppable_objs as ref_102
where sample_96.opfnamespace <= ref_101.usesysid
fetch first 76 rows only) as subq_29,
lateral (select
sample_96.opfmethod as c0
from
public.inhf as sample_99 tablesample system (10)
where sample_96.opfname ~~ subq_28.c0) as subq_30
where sample_96.opfnamespace = sample_96.opfnamespace
fetch first 111 rows only) as subq_31
where subq_31.c0 <= subq_31.c0
fetch first 100 rows only) as subq_32,
lateral (select
sample_100.srvfdw as c0
from
pg_catalog.pg_foreign_server as sample_100 tablesample bernoulli (0.7)
where (sample_96.opfowner >= subq_32.c0)
and (subq_32.c0 <= sample_96.opfmethod)
fetch first 117 rows only) as subq_33
where subq_33.c0 <= sample_96.opfowner;
select
subq_11.c0 as c0
from
(select
sample_23.srvversion as c0,
sample_23.srvfdw as c1
from
pg_catalog.pg_foreign_server as sample_23 tablesample bernoulli
(9.5)
where sample_23.srvowner <= sample_23.srvfdw) as subq_11
right join (select
sample_24.f as c0,
sample_24.e as c1,
sample_24.ee as c2,
sample_24.cc as c3,
sample_24.a as c4,
sample_24.class as c5
from
public.f_star as sample_24 tablesample system (4.8)
where sample_24.a ~<~ sample_24.a) as subq_12
on (subq_11.c0 = subq_12.c4 )
left join public.rtest_admin as ref_27
inner join (select
subq_17.c0 as c0,
subq_17.c0 as c1,
subq_17.c0 as c2
from
public.customer as ref_34,
lateral (select
ref_35.passwd as c0
from
pg_catalog.pg_user as ref_35
where true) as subq_17
where (((subq_17.c0 ~* ref_34.tel)
or (((subq_17.c0 @@ subq_17.c0)
or (subq_17.c0 ~>~ ref_34.passwd))
or (subq_17.c0 >= subq_17.c0)))
and (((ref_34.cid is not NULL)
or (ref_34.tel is NULL))
or (subq_17.c0 ~<~ subq_17.c0)))
or (ref_34.passwd ~<~ subq_17.c0)) as subq_18
inner join public.room as ref_36
on (subq_18.c2 = ref_36.comment )
on (ref_27.pname = ref_36.comment )
on (subq_11.c0 = ref_36.comment ),
lateral (select
ref_36.roomno as c0,
19 as c1,
subq_18.c0 as c2
from
public.clstr_tst_s as sample_36 tablesample bernoulli (7.9)
where true
fetch first 81 rows only) as subq_19
where ref_36.comment ~>~ subq_12.c4
fetch first 154 rows only;
select
subq_6.c1 as c0,
subq_0.c0 as c1,
sample_0.tmplinit as c2
from
pg_catalog.pg_ts_template as sample_0 tablesample system (5.1)
left join (select
ref_0.tgconstrrelid as c0
from
pg_catalog.pg_trigger as ref_0
where (ref_0.tgname < ref_0.tgname)
and (ref_0.tgtype is NULL)
fetch first 49 rows only) as subq_0
right join (select
subq_5.c9 as c0,
4 as c1
from
public.abstime_tbl as sample_23 tablesample bernoulli (3.8) ,
lateral (select
sample_24.a as c0,
sample_24.a as c1,
sample_23.f1 as c2,
sample_23.f1 as c3,
sample_24.a as c4,
sample_24.b as c5,
sample_24.a as c6,
sample_24.a as c7,
sample_24.b as c8,
sample_23.f1 as c9,
sample_23.f1 as c10,
sample_23.f1 as c11,
sample_23.f1 as c12,
sample_23.f1 as c13,
sample_24.a as c14,
sample_24.a as c15
from
testxmlschema.test1 as sample_24 tablesample system (9.4)
where sample_23.f1 <> sample_23.f1) as subq_5
where sample_23.f1 <= sample_23.f1) as subq_6
inner join (select
sample_25.collowner as c0,
sample_25.collowner as c1,
sample_25.collctype as c2,
42 as c3,
sample_25.collctype as c4,
sample_25.collnamespace as c5
from
pg_catalog.pg_collation as sample_25 tablesample bernoulli (8.5)
where (false)
or (sample_25.collname = sample_25.collctype)
fetch first 72 rows only) as subq_7
on (subq_6.c1 = subq_7.c3 )
on (subq_0.c0 = subq_7.c0 )
on (sample_0.tmplnamespace = subq_0.c0 ),
lateral (select
subq_7.c2 as c0,
subq_6.c1 as c1
from
information_schema.sql_packages as sample_26 tablesample system (1.2)
where ((subq_0.c0 = subq_0.c0)
and (subq_6.c1 <= 28))
and (subq_0.c0 = coalesce(subq_7.c5, subq_7.c0))
fetch first 101 rows only) as subq_8
where sample_0.tmplnamespace >= subq_0.c0
fetch first 30 rows only;
select
ref_109.name as c0,
ref_109.passwd as c1
from
(select
subq_30.c2 as c0,
ref_94.character_set_schema as c1
from
information_schema.collation_character_set_applicability as ref_94,
lateral (select
ref_94.character_set_name as c0,
ref_95.a as c1,
ref_95.b as c2
from
public.rtest_t9 as ref_95
where ref_95.b ~* ref_95.b
fetch first 122 rows only) as subq_30
where subq_30.c2 !~* subq_30.c2) as subq_31
inner join public.tenk2 as sample_106 tablesample system (5.4)
right join public.my_property_secure as ref_109
on (sample_106.odd = ref_109.cid )
on (subq_31.c0 = ref_109.name )
right join public.array_op_test as sample_107 tablesample bernoulli (4.8)
on (sample_106.twenty = sample_107.seqno ),
lateral (select
ref_110.x as c0,
subq_31.c1 as c1,
subq_31.c1 as c2,
subq_32.c0 as c3,
sample_107.i as c4
from
public.tt1 as ref_110,
lateral (select
sample_107.seqno as c0
from
public.path_tbl as sample_108 tablesample bernoulli (2.7)
where subq_31.c0 !~~* ref_109.tel
fetch first 134 rows only) as subq_32
where (subq_31.c0 !~* subq_31.c0)
and (EXISTS (
select
ref_111.sh_avail as c0
from
public.shoe_data as ref_111
where 7 <= 38
fetch first 109 rows only))
fetch first 130 rows only) as subq_33,
lateral (select
8 as c0,
subq_34.c0 as c1,
sample_107.seqno as c2,
ref_112.roomno as c3
from
public.room as ref_112,
lateral (select
subq_31.c1 as c0
from
pg_catalog.pg_attribute as ref_113
where subq_31.c0 @@ ref_109.name) as subq_34,
lateral (select
subq_33.c2 as c0,
sample_109.f2 as c1,
subq_31.c0 as c2,
sample_106.tenthous as c3
from
public.rules_src as sample_109 tablesample system (3.2)
where ref_112.comment < ref_109.tel
fetch first 40 rows only) as subq_35
where sample_107.i is NULL
fetch first 110 rows only) as subq_36
where subq_31.c0 is not NULL
fetch first 36 rows only;
select
sample_180.condeferred as c0,
subq_46.c4 as c1,
subq_46.c3 as c2
from
(select
ref_158.id as c0
from
public.dupindexcols as ref_158
where (EXISTS (
select
ref_159.p as c0,
subq_39.c2 as c1,
subq_39.c0 as c2
from
public.gist_point_tbl as ref_159,
lateral (select
ref_159.id as c0,
ref_160.factor as c1,
ref_160.factor as c2
from
public.rtest_unitfact as ref_160
where (ref_159.p ~= ref_159.p)
and ((ref_160.factor is NULL)
and (EXISTS (
select
ref_161.blks_hit as c0,
ref_161.relid as c1,
ref_161.schemaname as c2
from
pg_catalog.pg_statio_sys_sequences as ref_161
where ref_161.relname < ref_161.schemaname)))) as
subq_39
where EXISTS (
select
sample_154.x as c0,
sample_154.x as c1,
sample_154.y as c2,
sample_154.x as c3,
sample_154.y as c4,
sample_154.x as c5
from
public.tt0 as sample_154 tablesample system (9.6)
where 5 <> 24
fetch first 63 rows only)))
and (ref_158.f1 @@ ref_158.f1)
fetch first 163 rows only) as subq_40
inner join (select
subq_45.c0 as c0,
26 as c1,
subq_45.c0 as c2,
sample_179.i2 as c3,
subq_45.c0 as c4,
sample_179.i2 as c5
from
public.defaultexpr_tbl as sample_179 tablesample bernoulli (3.1) ,
lateral (select
ref_191.t as c0
from
public.btree_tall_tbl as ref_191
where ref_191.id is NULL
fetch first 62 rows only) as subq_45
where subq_45.c0 is NULL) as subq_46
right join pg_catalog.pg_constraint as sample_180 tablesample bernoulli
(9.5)
on (subq_46.c4 = sample_180.consrc )
on (subq_40.c0 = subq_46.c3 ),
lateral (select
sample_181.comments as c0,
sample_180.conffeqop as c1,
sample_181.feature_name as c2,
subq_40.c0 as c3,
subq_46.c2 as c4
from
information_schema.sql_packages as sample_181 tablesample system (9)
where (subq_46.c2 ~>=~ subq_46.c2)
and (subq_46.c1 > 9)
fetch first 100 rows only) as subq_47
where sample_180.consrc !~~ subq_46.c4
fetch first 87 rows only;
select
subq_7.c0 as c0,
subq_7.c1 as c1,
subq_2.c1 as c2,
subq_7.c0 as c3
from
(select
coalesce(sample_2.b, sample_2.b) as c0,
sample_2.b as c1
from
public.dropcolumn as sample_2 tablesample system (0.8)
where 35 < 14) as subq_2
inner join (select
subq_3.c0 as c0,
ref_4.action_reference_old_row as c1
from
public.a as ref_3
right join information_schema.triggers as ref_4
on (ref_3.aa = ref_4.action_order ),
lateral (select
ref_3.aa as c0,
ref_5.xx as c1,
ref_5.xx as c2
from
public.inhf as ref_5
where false
fetch first 80 rows only) as subq_3,
lateral (select
subq_3.c0 as c0,
subq_3.c2 as c1
from
information_schema.udt_privileges as ref_6,
lateral (select
ref_6.privilege_type as c0,
ref_4.event_object_catalog as c1,
ref_7.foreign_data_wrapper_name as c2
from
information_schema.foreign_servers as ref_7,
lateral (select
sample_3.a as c0
from
public.rewritemetoo1 as sample_3 tablesample system
(1.3)
where sample_3.a > subq_3.c2) as subq_4
where (subq_4.c0 = subq_4.c0)
or (subq_4.c0 <= subq_4.c0)
fetch first 90 rows only) as subq_5
where (subq_3.c1 ~<=~ subq_3.c2)
and (subq_3.c2 ~~* subq_3.c2)
fetch first 83 rows only) as subq_6
where (ref_4.event_manipulation is not NULL)
or (((subq_6.c1 is not NULL)
or (false))
or (subq_6.c1 >= subq_6.c1))) as subq_7
on (subq_2.c0 = subq_7.c0 ),
lateral (select
subq_2.c0 as c0,
subq_11.c1 as c1
from
public.int8_tbl as sample_4 tablesample bernoulli (7.3) ,
lateral (select
subq_10.c1 as c0,
subq_9.c0 as c1,
subq_2.c0 as c2
from
information_schema.column_domain_usage as ref_8,
lateral (select
sample_5.x as c0
from
public.tt6 as sample_5 tablesample system (8.1) ,
lateral (select
subq_2.c0 as c0
from
public.rule_and_refint_t1 as ref_9
where ref_9.id1a is not NULL
fetch first 146 rows only) as subq_8
where sample_4.q1 is NULL
fetch first 150 rows only) as subq_9,
lateral (select
ref_8.domain_schema as c0,
subq_7.c1 as c1
from
information_schema.sql_sizing_profiles as sample_6
tablesample system (5.8)
where (39 <= 24)
and ((18 <= 12)
and ((((((sample_6.sizing_name is NULL)
or (11 > 32))
and (33 <= 19))
or ((subq_2.c1 is NULL)
or (subq_9.c0 is not NULL)))
or (6 <> 42))
and (22 > 35)))) as subq_10
where subq_7.c1 is not NULL
fetch first 41 rows only) as subq_11
where 17 <> 22) as subq_12
where subq_12.c0 is NULL
fetch first 37 rows only;
select
subq_32.c0 as c0,
subq_32.c0 as c1
from
public.num_exp_div as ref_135
left join (select
ref_136.name as c0,
ref_136.prepare_time as c1,
ref_136.statement as c2,
subq_21.c6 as c3,
ref_136.from_sql as c4,
subq_21.c4 as c5
from
pg_catalog.pg_prepared_statements as ref_136,
lateral (select
ref_136.prepare_time as c0,
ref_136.statement as c1,
sample_110.f1 as c2,
33 as c3,
sample_110.f1 as c4,
sample_110.f1 as c5,
42 as c6,
sample_110.f1 as c7,
ref_136.parameter_types as c8
from
public.check_con_tbl as sample_110 tablesample bernoulli (8.3)
where ref_136.name ~ ref_136.name) as subq_21
where true) as subq_22
on (ref_135.id2 = subq_22.c5 ),
lateral (select
ref_138.slotlink as c0,
subq_22.c5 as c1,
sample_112.a as c2
from
public.phone as ref_138
right join testxmlschema.test1 as sample_112 tablesample bernoulli
(9.9)
on (ref_138.comment = sample_112.b ),
lateral (select
ref_138.comment as c0,
ref_138.comment as c1
from
public.ihighway as sample_113 tablesample system (8.3)
where ((sample_113.name ~<~ sample_113.name)
or (ref_138.comment ~>=~ ref_138.comment))
and (ref_138.comment ~<~ sample_113.name)) as subq_23
where true) as subq_24,
lateral (select
subq_22.c3 as c0,
subq_22.c0 as c1,
ref_139.name as c2,
subq_22.c0 as c3,
25 as c4,
ref_135.id2 as c5
from
public.street as ref_139
where (((subq_22.c3 > subq_22.c3)
or (subq_22.c2 ~~* ref_139.name))
and (ref_139.name ~ ref_139.name))
or (ref_139.name ~* ref_139.cname)
fetch first 83 rows only) as subq_25,
lateral (select
ref_135.id1 as c0
from
public.ruletest_tbl as ref_144
inner join public.domcontest as sample_116 tablesample system (5.2)
on (ref_144.a = sample_116.col1 ),
lateral (select
ref_145.foreign_data_wrapper_catalog as c0,
subq_25.c0 as c1,
ref_145.option_name as c2
from
information_schema.foreign_data_wrapper_options as ref_145
where ((subq_22.c3 >= subq_22.c3)
or (subq_25.c3 ~<~ subq_25.c3))
and (EXISTS (
select
sample_117.w as c0,
sample_117.d as c1,
sample_117.w as c2,
sample_117.d as c3,
sample_117.d as c4,
sample_117.d as c5,
sample_117.w as c6
from
public.renamecolumn as sample_117 tablesample system (7.1)
where 1 <> 38
fetch first 92 rows only))
fetch first 124 rows only) as subq_27,
lateral (select
subq_24.c1 as c0
from
public.ec2 as ref_146
where subq_22.c3 <> subq_27.c1) as subq_28,
lateral (select
sample_116.col1 as c0,
ref_144.a as c1
from
public.rtest_unitfact as ref_147,
lateral (select
sample_116.col1 as c0
from
public.rtest_t7 as sample_118 tablesample system (2.5) ,
lateral (select
subq_24.c2 as c0,
sample_116.col1 as c1,
subq_22.c0 as c2
from
information_schema.sql_sizing_profiles as sample_119
tablesample system (6.2)
where subq_22.c2 ~>~ sample_118.b
fetch first 116 rows only) as subq_29
where 35 <= subq_25.c4) as subq_30
where subq_22.c0 ~* subq_25.c2
fetch first 21 rows only) as subq_31
where subq_22.c0 < subq_22.c2
fetch first 71 rows only) as subq_32
where subq_22.c2 <> subq_22.c0;
select
ref_44.umoptions as c0,
subq_12.c1 as c1
from
pg_catalog.pg_user_mappings as ref_44
right join pg_catalog.pg_stat_xact_all_tables as ref_45
on (ref_44.srvname = ref_45.schemaname ),
lateral (select
coalesce(ref_46.udt_catalog, ref_46.udt_schema) as c0,
ref_44.srvid as c1
from
information_schema.column_udt_usage as ref_46
where ref_44.umuser >= ref_45.relid
fetch first 84 rows only) as subq_12
where ref_44.umid = coalesce(subq_12.c1, subq_12.c1);
select
sample_5.slotname as c0,
subq_5.c0 as c1
from
(select
coalesce(ref_1.name, ref_2.y) as c0,
ref_2.y as c1
from
public.road as ref_1
left join public.insert_tbl as ref_2
on (ref_1.name = ref_2.y ),
lateral (select
ref_2.z as c0
from
public.gist_point_tbl as sample_4 tablesample system (3.8)
where ref_1.name ~* ref_2.y
fetch first 142 rows only) as subq_4
where ref_1.thepath is NULL) as subq_5
right join public.pslot as sample_5 tablesample system (1.6)
on (subq_5.c1 = sample_5.pfname )
where subq_5.c1 !~~ sample_5.pfname
fetch first 26 rows only;
select
subq_1.c0 as c0,
sample_0.expr as c1
from
public.query as sample_0 tablesample bernoulli (6)
left join (select
coalesce(ref_0.cid, ref_0.climit) as c0,
subq_0.c2 as c1,
ref_0.tel as c2
from
public.my_credit_card_normal as ref_0,
lateral (select
ref_1.amt as c0,
ref_0.passwd as c1,
ref_0.cnum as c2,
ref_1.amt as c3
from
public.t as ref_1
where (ref_1.type <> ref_0.passwd)
and (ref_1.type is not NULL)
fetch first 101 rows only) as subq_0
where ref_0.tel is not NULL) as subq_1
on (sample_0.expr = subq_1.c1 )
where sample_0.expr ~>=~ sample_0.expr
fetch first 51 rows only;
select
subq_1.c3 as c0,
subq_1.c2 as c1,
subq_1.c0 as c2,
subq_1.c0 as c3
from
(select
ref_0.umid as c0,
sample_0.opfname as c1,
subq_0.c1 as c2,
ref_0.umoptions as c3
from
pg_catalog.pg_opfamily as sample_0 tablesample system (4.8)
left join pg_catalog.pg_user_mappings as ref_0
on (sample_0.opfname = ref_0.srvname ),
lateral (select
ref_0.usename as c0,
ref_0.srvname as c1
from
public.phone as sample_1 tablesample bernoulli (4)
where sample_0.opfowner <= sample_0.opfnamespace
fetch first 117 rows only) as subq_0
where subq_0.c0 >= ref_0.srvname
fetch first 143 rows only) as subq_1
where subq_1.c1 <= subq_1.c2
fetch first 100 rows only;
select
sample_75.rf_a as c0
from
(select
coalesce(ref_58.name, ref_57.c) as c0
from
public.clstr_tst as ref_57
inner join public.person as ref_58
on (ref_57.a = ref_58.age ),
lateral (select
ref_58.location as c0,
ref_58.location as c1
from
public.rtest_view3 as sample_71 tablesample bernoulli (1)
where (true)
or (ref_57.d <> ref_57.d)
fetch first 176 rows only) as subq_18
where ref_58.location << subq_18.c0) as subq_19
right join public.clstr_tst_s as sample_75 tablesample system (3.5)
inner join public.rtest_view4 as ref_61
on (sample_75.b = ref_61.a )
inner join public.rtest_order2 as ref_62
on (ref_61.c = ref_62.a )
on (subq_19.c0 = ref_61.b )
where subq_19.c0 >= subq_19.c0
fetch first 107 rows only;
select
sample_222.id2 as c0,
sample_223.a as c1,
sample_223.a as c2,
sample_223.a as c3
from
public.num_result as sample_222 tablesample system (5.5)
inner join public.rc_test as sample_223 tablesample system (1)
on (sample_222.id1 = sample_223.a )
left join (select
coalesce(sample_225.a, ref_215.b) as c0
from
public.rtest_t9 as sample_225 tablesample system (3.7)
inner join public.ruletest_tbl as ref_215
on (sample_225.a = ref_215.a ),
lateral (select
ref_215.b as c0
from
public.tt7 as sample_226 tablesample system (8.8)
where sample_225.b !~* sample_225.b
fetch first 190 rows only) as subq_62
where (sample_225.b @@ sample_225.b)
or (true)) as subq_63
on (sample_222.id1 = subq_63.c0 )
where subq_63.c0 is NULL
fetch first 157 rows only;
select
coalesce(ref_10.a, ref_10.a) as c0,
ref_10.a as c1
from
public.rewritemetoo2 as ref_10
left join (select
coalesce(subq_5.c0, sample_10.pfname) as c0
from
public.pslot as sample_10 tablesample system (9.7) ,
lateral (select
ref_11.roname as c0
from
pg_catalog.pg_replication_origin as ref_11
where sample_10.pfname >= ref_11.roname
fetch first 136 rows only) as subq_5,
lateral (select
subq_5.c0 as c0,
sample_10.pfname as c1,
sample_11.y as c2,
sample_11.y as c3,
subq_5.c0 as c4
from
public.tt2 as sample_11 tablesample system (3)
where sample_11.y is NULL
fetch first 53 rows only) as subq_6
where true) as subq_7
on (ref_10.a = subq_7.c0 )
where subq_7.c0 !~~ subq_7.c0;
select
subq_1.c2 as c0,
subq_1.c0 as c1,
subq_1.c8 as c2,
sample_1.deptype as c3
from
(select
ref_0.character_set_catalog as c0,
ref_0.udt_catalog as c1,
ref_0.data_type as c2,
ref_0.numeric_precision_radix as c3,
subq_0.c0 as c4,
subq_0.c1 as c5,
subq_0.c0 as c6,
ref_0.scope_name as c7,
ref_0.udt_name as c8
from
information_schema.domains as ref_0,
lateral (select
sample_0.age as c0,
ref_0.data_type as c1
from
public.emp as sample_0 tablesample bernoulli (5.4)
where sample_0.manager <> sample_0.manager
fetch first 88 rows only) as subq_0
where 32 >= 28) as subq_1
right join pg_catalog.pg_shdepend as sample_1 tablesample bernoulli (9.7)
on (subq_1.c4 = sample_1.objsubid )
where sample_1.dbid is NULL
fetch first 158 rows only;
select
subq_15.c1 as c0
from
public.tt7 as ref_20
left join (select
subq_14.c1 as c0,
coalesce(sample_16.aa, ref_22.id1) as c1
from
public.num_result as ref_22
inner join public.a as sample_16 tablesample system (9)
on (ref_22.id2 = sample_16.aa ),
lateral (select
ref_23.seq_scan as c0,
ref_23.n_tup_upd as c1,
ref_22.id2 as c2
from
pg_catalog.pg_stat_xact_all_tables as ref_23
where false) as subq_13,
lateral (select
sample_16.aa as c0,
subq_13.c2 as c1
from
public.query as ref_24
where true
fetch first 99 rows only) as subq_14
where ref_22.result > ref_22.result) as subq_15
on (ref_20.x = subq_15.c0 )
where (ref_20.y < ref_20.y)
or (ref_20.y >= ref_20.y)
fetch first 161 rows only;
select
ref_76.srvid as c0,
ref_76.umoptions as c1,
ref_77.datid as c2,
ref_77.tup_inserted as c3,
ref_76.umoptions as c4
from
pg_catalog.pg_user_mappings as ref_76
right join pg_catalog.pg_stat_database as ref_77
on (ref_76.srvname = ref_77.datname ),
lateral (select
ref_76.umuser as c0,
ref_77.datid as c1
from
pg_catalog.pg_stat_all_indexes as ref_100
left join pg_catalog.pg_extension as ref_101
on (ref_100.schemaname = ref_101.extname ),
lateral (select
ref_100.relname as c0,
ref_76.srvname as c1
from
public.toyemp as ref_102
where ((ref_100.indexrelname >= ref_100.schemaname)
and (ref_77.stats_reset is NULL))
or (ref_76.srvid < ref_76.umid)) as subq_33
where ref_100.schemaname is NULL
fetch first 33 rows only) as subq_34
where ref_76.umuser >= subq_34.c1
fetch first 65 rows only;
select
subq_1.c0 as c0,
subq_3.c4 as c1,
subq_1.c3 as c2
from
(select
coalesce(sample_4.e, sample_4.b) as c0,
sample_4.e as c1,
sample_4.b as c2,
sample_4.e as c3
from
public.dropcolumnchild as sample_4 tablesample bernoulli (3.3)
where 15 >= 36) as subq_1
left join (select
ref_2.relid as c0,
coalesce(ref_2.relid, ref_2.indexrelid) as c1,
subq_2.c0 as c2,
ref_2.schemaname as c3,
subq_2.c0 as c4,
subq_2.c0 as c5
from
pg_catalog.pg_stat_sys_indexes as ref_2,
lateral (select
sample_5.unique2 as c0
from
public.onek as sample_5 tablesample system (0.4)
where ref_2.indexrelid > ref_2.relid
fetch first 138 rows only) as subq_2
where ref_2.idx_scan is not NULL) as subq_3
on (subq_1.c2 = subq_3.c2 )
where subq_3.c1 >= subq_3.c0;
select
ref_1.aa as c0,
subq_1.c1 as c1,
coalesce(ref_1.class, ref_1.class) as c2,
subq_1.c0 as c3
from
(select
subq_0.c1 as c0,
coalesce(sample_0.a, sample_1.i) as c1
from
public.rtest_t9 as sample_0 tablesample bernoulli (5.6)
inner join public.iportaltest as sample_1 tablesample bernoulli
(9.8)
on (sample_0.a = sample_1.i ),
lateral (select
sample_1.d as c0,
ref_0.a as c1,
sample_1.p as c2,
ref_0.a as c3,
ref_0.a as c4,
sample_0.b as c5,
sample_1.i as c6
from
public.rtest_view2 as ref_0
where sample_0.b = sample_0.b
fetch first 93 rows only) as subq_0
where sample_0.b ~<=~ sample_0.b) as subq_1
right join public.e_star as ref_1
on (subq_1.c0 = ref_1.aa )
where ref_1.cc < ref_1.cc
fetch first 59 rows only;
select
subq_2.c0 as c0
from
information_schema.sql_sizing_profiles as ref_1
left join (select
coalesce(ref_6.a, sample_7.random) as c0,
subq_1.c1 as c1
from
public.bt_i4_heap as sample_7 tablesample system (9.7)
inner join public.rtest_t9 as ref_6
on (sample_7.random = ref_6.a ),
lateral (select
ref_7.idx_tup_fetch as c0,
sample_7.seqno as c1,
sample_7.seqno as c2,
ref_6.b as c3,
sample_7.seqno as c4
from
pg_catalog.pg_stat_sys_tables as ref_7
where (ref_7.schemaname !~~* ref_6.b)
or (ref_6.b !~~ ref_6.b)
fetch first 168 rows only) as subq_1
where (ref_6.b < ref_6.b)
and (ref_6.b !~ ref_6.b)) as subq_2
on (ref_1.required_value = subq_2.c0 )
where (ref_1.profile_id is NULL)
and ((41 > coalesce(1, 4))
and (27 = 35))
fetch first 91 rows only;
select
sample_69.tmpllibrary as c0,
coalesce(sample_69.tmplname, sample_69.tmplname) as c1,
subq_33.c0 as c2
from
(select
coalesce(ref_53.provider, sample_68.typdefault) as c0
from
pg_catalog.pg_type as sample_68 tablesample bernoulli (6.9)
inner join pg_catalog.pg_shseclabel as ref_53
on (sample_68.typowner = ref_53.objoid ),
lateral (select
sample_68.typcategory as c0,
ref_54.speaker as c1,
ref_54.speaker as c2
from
public.test_range_excl as ref_54
where (ref_53.label >= ref_53.provider)
and (ref_53.label !~* ref_53.provider)
fetch first 143 rows only) as subq_32
where ref_53.label ~>~ ref_53.label) as subq_33
right join pg_catalog.pg_pltemplate as sample_69 tablesample bernoulli
(9.8)
on (subq_33.c0 = sample_69.tmplhandler )
where sample_69.tmplvalidator ~ subq_33.c0
fetch first 131 rows only;
select
subq_1.c3 as c0,
subq_1.c1 as c1,
sample_4.x as c2,
subq_1.c3 as c3,
subq_1.c4 as c4,
subq_1.c0 as c5
from
(select
ref_0.a as c0,
subq_0.c2 as c1,
ref_0.a as c2,
coalesce(ref_0.a, sample_2.random) as c3,
ref_0.b as c4
from
public.bt_txt_heap as sample_2 tablesample system (8.4)
left join public.rtest_nothn3 as ref_0
on (sample_2.seqno = ref_0.b ),
lateral (select
sample_2.seqno as c0,
sample_2.random as c1,
sample_2.seqno as c2,
sample_2.seqno as c3,
ref_0.a as c4
from
public.dropcolumnexists as sample_3 tablesample system (2.5)
where ref_0.b !~~* sample_2.seqno
fetch first 178 rows only) as subq_0
where ref_0.b is not NULL) as subq_1
right join public.insert_tbl as sample_4 tablesample system (7.8)
on (subq_1.c4 = sample_4.y )
where subq_1.c1 ~ subq_1.c4;
select
subq_10.c0 as c0
from
(select
ref_9.b as c0,
subq_8.c0 as c1,
coalesce(sample_9.b, ref_9.b) as c2
from
public.tab1 as sample_9 tablesample bernoulli (6.5)
inner join public.rtest_vview4 as ref_9
on (sample_9.b = ref_9.b ),
lateral (select
sample_10.f2 as c0,
sample_10.ff as c1,
sample_10.ff as c2
from
public.ec0 as sample_10 tablesample bernoulli (6.8)
where sample_9.b !~~ ref_9.b
fetch first 106 rows only) as subq_8
where (ref_9.b > sample_9.b)
or (sample_9.b >= sample_9.b)) as subq_9
right join (select
ref_10.b as c0
from
public.rtest_view3 as ref_10
where ref_10.a is NULL) as subq_10
on (subq_9.c0 = subq_10.c0 )
where ((subq_10.c0 ~~* subq_10.c0)
or ((subq_9.c2 ~~* subq_10.c0)
or (coalesce(subq_10.c0, subq_9.c2) !~ subq_9.c0)))
or (false)
fetch first 126 rows only;
select
sample_1.z as c0,
subq_2.c0 as c1
from
(select
subq_1.c0 as c0,
coalesce(ref_0.hobby, subq_0.c0) as c1
from
public.equipment_r as ref_0,
lateral (select
ref_1.xx as c0
from
public.inhx as ref_1
where ref_1.xx = ref_1.xx
fetch first 110 rows only) as subq_0,
lateral (select
ref_0.name as c0,
subq_0.c0 as c1,
sample_0.outline as c2,
sample_0.pop as c3,
sample_0.outline as c4,
sample_0.pop as c5
from
public.real_city as sample_0 tablesample bernoulli (8.6)
where subq_0.c0 @@ subq_0.c0
fetch first 109 rows only) as subq_1
where (true)
and (false)) as subq_2
right join public.copy_tbl as sample_1 tablesample bernoulli (9.8)
on (subq_2.c1 = sample_1.y )
where (subq_2.c1 < subq_2.c1)
and (subq_2.c1 ~* subq_2.c0)
fetch first 112 rows only;
select
subq_42.c0 as c0
from
public.depth1 as sample_103 tablesample system (9.5)
right join pg_catalog.pg_description as ref_114
on (sample_103.c = ref_114.description )
left join (select
subq_41.c0 as c0,
subq_41.c0 as c1,
coalesce(subq_40.c0, sample_104.lomowner) as c2
from
pg_catalog.pg_largeobject_metadata as sample_104 tablesample system
(5.6) ,
lateral (select
sample_104.lomowner as c0
from
public.tt7 as ref_115
where ref_115.y <> ref_115.y
fetch first 105 rows only) as subq_40,
lateral (select
subq_40.c0 as c0
from
public.tt7 as sample_105 tablesample system (9.1)
where (subq_40.c0 = sample_104.lomowner)
and (sample_105.y < sample_105.y)
fetch first 56 rows only) as subq_41
where subq_40.c0 is not NULL) as subq_42
on (ref_114.classoid = subq_42.c0 )
where subq_42.c2 = subq_42.c2
fetch first 103 rows only;
select
subq_56.c0 as c0,
sample_188.opcname as c1,
sample_188.opcdefault as c2,
subq_56.c0 as c3,
sample_188.opcname as c4,
subq_56.c0 as c5,
sample_188.opckeytype as c6,
subq_56.c0 as c7,
sample_188.opcname as c8,
subq_56.c0 as c9
from
(select
coalesce(ref_225.tablename, ref_225.rulename) as c0
from
pg_catalog.pg_rules as ref_225,
lateral (select
ref_226.constraint_schema as c0,
ref_225.definition as c1,
ref_225.tablename as c2,
ref_226.constraint_catalog as c3
from
information_schema.constraint_table_usage as ref_226
where ref_225.tablename = ref_225.schemaname
fetch first 173 rows only) as subq_55
where ref_225.rulename <> ref_225.rulename) as subq_56
right join pg_catalog.pg_opclass as sample_188 tablesample system (9.6)
on (subq_56.c0 = sample_188.opcname )
where (sample_188.opcmethod < sample_188.opcowner)
or (subq_56.c0 >= sample_188.opcname)
fetch first 55 rows only;
select
subq_48.c0 as c0,
coalesce(subq_48.c0, subq_50.c1) as c1
from
(select
sample_155.d as c0
from
public.renamecolumnanother as sample_155 tablesample system (5.7)
where 11 > 24
fetch first 164 rows only) as subq_48
left join (select
coalesce(sample_167.b, sample_166.a) as c0,
sample_166.b as c1,
coalesce(subq_49.c1, sample_167.a) as c2,
sample_166.b as c3,
subq_49.c0 as c4,
sample_166.b as c5
from
public.test_storage as sample_166 tablesample system (1.5)
inner join public.rtest_nothn1 as sample_167 tablesample bernoulli
(6.5)
on (sample_166.b = sample_167.a ),
lateral (select
sample_166.b as c0,
sample_166.b as c1,
sample_167.a as c2
from
public.test_inh_check as ref_164
where ref_164.a <= ref_164.a
fetch first 43 rows only) as subq_49
where sample_167.a is NULL) as subq_50
on (subq_48.c0 = subq_50.c1 )
where subq_50.c0 ~>~ subq_50.c0;
select
subq_1.c6 as c0
from
(select
subq_0.c1 as c0,
subq_0.c1 as c1,
ref_0.table_schema as c2,
ref_0.with_hierarchy as c3,
subq_0.c6 as c4,
subq_0.c5 as c5,
ref_0.is_grantable as c6
from
information_schema.table_privileges as ref_0,
lateral (select
ref_0.privilege_type as c0,
ref_1.odd as c1,
ref_1.two as c2,
ref_1.tenthous as c3,
ref_0.with_hierarchy as c4,
ref_1.string4 as c5,
ref_0.table_schema as c6,
ref_0.grantor as c7,
ref_0.grantee as c8,
ref_0.with_hierarchy as c9
from
public.bprime as ref_1
where (ref_1.stringu1 <= ref_1.stringu1)
and ((true)
or (false))
fetch first 108 rows only) as subq_0
where subq_0.c5 <> subq_0.c5) as subq_1
right join public.bt_f8_heap as ref_2
on (subq_1.c1 = ref_2.random )
where subq_1.c5 < subq_1.c5
fetch first 30 rows only;
select
subq_2.c0 as c0,
coalesce(subq_0.c0, subq_0.c0) as c1,
subq_2.c1 as c2,
subq_0.c0 as c3,
subq_2.c0 as c4
from
(select
sample_0.x as c0
from
public.tab2 as sample_0 tablesample system (3.8)
where 23 < 42) as subq_0
left join (select
sample_1.id2 as c0,
coalesce(sample_1.id2, sample_2.a) as c1
from
public.num_result as sample_1 tablesample bernoulli (1.2)
inner join public.rtest_t8 as sample_2 tablesample system (5.6)
on (sample_1.id2 = sample_2.a ),
lateral (select
sample_1.id1 as c0,
sample_1.result as c1
from
information_schema.foreign_server_options as ref_0
where (sample_2.b > sample_2.b)
or (((sample_1.result is not NULL)
or (sample_1.result <> sample_1.result))
or (true))
fetch first 86 rows only) as subq_1
where subq_1.c1 < subq_1.c1) as subq_2
on (subq_0.c0 = subq_2.c0 )
where (subq_0.c0 is not NULL)
or ((7 <> 4)
and (11 <= 20));
select
ref_138.cname as c0,
subq_54.c5 as c1
from
(select
sample_112.b as c0,
subq_53.c5 as c1,
sample_113.id as c2,
subq_53.c2 as c3,
sample_112.b as c4,
coalesce(sample_113.id, sample_112.a) as c5
from
public.rtest_t9 as sample_112 tablesample system (6.4)
inner join public.num_data as sample_113 tablesample bernoulli
(4.8)
on (sample_112.a = sample_113.id ),
lateral (select
sample_112.a as c0,
sample_113.val as c1,
sample_113.id as c2,
sample_113.id as c3,
sample_112.a as c4,
sample_113.id as c5,
sample_114.loid as c6,
sample_113.id as c7
from
pg_catalog.pg_largeobject as sample_114 tablesample system
(8.1)
where true
fetch first 105 rows only) as subq_53
where sample_113.val = sample_113.val) as subq_54
right join public.real_city as ref_138
on (subq_54.c4 = ref_138.cname )
where true
fetch first 127 rows only;
select
subq_18.c0 as c0,
ref_33.a as c1
from
public.domain_test as ref_32
right join public.rtest_t8 as ref_33
on (ref_32.b = ref_33.a )
inner join public.rewritemetoo2 as sample_35 tablesample bernoulli
(7.9)
on (ref_33.b = sample_35.a )
right join public.bt_i4_heap as sample_62 tablesample system (9.8)
left join public.spgist_point_tbl as ref_61
on (sample_62.seqno = ref_61.id )
on (ref_33.a = ref_61.id )
left join (select
coalesce(sample_71.f1, ref_70.objsubid) as c0
from
public.check_con_tbl as sample_71 tablesample bernoulli (6.5)
inner join pg_catalog.pg_description as ref_70
on (sample_71.f1 = ref_70.objsubid ),
lateral (select
sample_71.f1 as c0,
sample_71.f1 as c1,
ref_70.description as c2
from
public.person as sample_72 tablesample system (3.1)
where sample_72.location is not NULL
fetch first 99 rows only) as subq_17
where ref_70.description <= subq_17.c2) as subq_18
on (sample_62.random = subq_18.c0 )
where ref_61.p <^ ref_61.p;
select
subq_3.c0 as c0
from
public.credit_card as sample_1 tablesample bernoulli (4.4)
left join public.stud_emp as sample_2 tablesample bernoulli (0.4)
on (sample_1.cnum = sample_2.name )
left join (select
coalesce(sample_8.b, ref_10.prosrc) as c0,
subq_2.c1 as c1
from
public.rtest_t6 as sample_8 tablesample bernoulli (7)
inner join pg_catalog.pg_proc as ref_10
on (sample_8.b = ref_10.prosrc ),
lateral (select
ref_10.provolatile as c0,
sample_8.b as c1,
ref_10.prosrc as c2,
sample_8.b as c3
from
public.num_exp_sub as sample_9 tablesample system (6.9)
where EXISTS (
select
ref_11.rf_a as c0
from
public.clstr_tst_s as ref_11
where ref_11.rf_a is not NULL
fetch first 106 rows only)
fetch first 76 rows only) as subq_2
where ref_10.prosrc is not NULL) as subq_3
on (sample_1.cnum = subq_3.c0 )
where (subq_3.c1 ~~* subq_3.c1)
or (29 is not NULL)
fetch first 31 rows only;
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers