set current_schema='shipping_schema';
explain (costs off) select t4.a,convert_from(convert(convert_to(t5.c, 'GBK'),'GBK','LATIN1'),'LATIN1') from t4, t5 where t4.b = t5.a order by 1 limit 3;
select t4.a,convert_from(convert(convert_to(t5.c, 'GBK'),'GBK','LATIN1'),'LATIN1') from t4, t5 where t4.b = t5.a order by 1,2 limit 3;
explain (costs off) select t4.a from t4, t5 where t4.b = t5.a and t4.c = convert_from(convert(convert_to(t5.c, 'GBK'),'GBK','LATIN1'),'LATIN1') order by 1 limit 3;
select t4.a from t4, t5 where t4.b = t5.a and t4.c = convert_from(convert(convert_to(t5.c, 'GBK'),'GBK','LATIN1'),'LATIN1') order by 1 limit 3;
explain (costs off)
select t4.a, age(timestamptz'1757-06-13+08') > interval '1 year', age(timestamp'9999-06-13') > interval '1 year' from t4, t5 where t4.b = t5.a order by 1,2,3 limit 1;
select t4.a, age(timestamptz'1757-06-13+08') > interval '1 year', age(timestamp'9999-06-13') > interval '1 year' from t4, t5 where t4.b = t5.a order by 1,2,3 limit 1;
explain (costs off)
select t4.a from t4, t5 where t4.b = t5.a and age(timestamptz'1757-06-13+08') > interval '1 year' and age(timestamp'9999-06-13') < interval '1 year' order by 1 limit 1;
select t4.a from t4, t5 where t4.b = t5.a and age(timestamptz'1757-06-13+08') > interval '1 year' and age(timestamp'9999-06-13') < interval '1 year' order by 1 limit 1;
explain (costs off)
select overlaps(t6.b,t6.c,t7.b,t7.c), overlaps(t6.b,t7.b,t7.b,t7.c),overlaps(t6.b,t6.c,t7.b,t6.b) from t6, t7 where t6.d = t7.d;
select overlaps(t6.b,t6.c,t7.b,t7.c), overlaps(t6.b,t7.b,t7.b,t7.c),overlaps(t6.b,t6.c,t7.b,t6.b) from t6, t7 where t6.d = t7.d;
explain (costs off)
select t6.e, t7.e from t6,t7 where overlaps(t6.b,t7.b,t7.b,t7.c) and overlaps(t6.b,t6.c,t7.b,t7.c) and overlaps(t6.b,t6.c,t7.b,t6.b) order by 1,2;
select t6.e, t7.e from t6,t7 where overlaps(t6.b,t7.b,t7.b,t7.c) and overlaps(t6.b,t6.c,t7.b,t7.c) and overlaps(t6.b,t6.c,t7.b,t6.b) order by 1,2;
explain (costs off)
select to_char(t8.a,'00999.00')from t8 ;
select to_char(t8.a,'00999.00')from t8 order by 1;
explain (costs off)
select t8.a,t8.b from t8 ,t9 where t8.c=t9.c and to_char(t8.a,'00999.9900') = to_char(t9.b,'00999.9900');
select t8.a,t8.b from t8 ,t9 where t8.c=t9.c and to_char(t8.a,'00999.9900') = to_char(t9.b,'00999.9900');
explain (costs off)
select to_number(t8.a::text,'9999.00') from t8 ,t9 where t8.c=t9.c;
select to_number(t8.a::text,'9999.00') from t8 ,t9 where t8.c=t9.c order by 1;
explain (costs off)
select t8.a,t8.b from t8 ,t9 where t8.c=t9.c and to_number(t8.a::text,'00999999.999900') = to_number(t9.b,'00999999.9999900');
select t8.a,t8.b from t8 ,t9 where t8.c=t9.c and to_number(t8.a::text,'00999999.999900') = to_number(t9.b,'00999999.9999900');
explain (costs off)
select timezone('hkt',current_time),count(*) from t4, t9 where t4.b = t9.c order by 1;
explain (costs off)
select pg_char_to_encoding('UTF-8'),count(*) from t4, t9 where t4.b = t9.c order by 1;
explain (costs off)
select pg_encoding_to_char(7),count(*) from t4, t9 where t4.b = t9.c order by 1;
explain (costs off)
select regexp_like(t10.a, t10.a, 'i'),count(*) from t10, t9 where t10.b = t9.c group by t10.a order by 1;
explain (costs off)
select regexp_like(t10.a, t10.a, 'm'),count(*) from t10, t9 where t10.b = t9.c group by t10.a order by 1;
explain (costs off)
select regexp_like(t10.a, t10.a, 'c'),count(*) from t10, t9 where t10.b = t9.c group by t10.a order by 1;
explain select count(*) from t10,
(select * from generate_series('2018-10-25 00:00:00+08'::timestamptz,'2018-10-26 00:00:00+08'::timestamptz,'1 hour'))tmp
where t10.a = tmp.generate_series order by 1;