流水线测试用例修改: record_slow_sql_in_proc
This commit is contained in:
@ -36,36 +36,28 @@ call test_slow_sql();
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
(1 row)
|
||||
|
||||
select query, query_plan, is_slow_sql from statement_history where query_plan is not null order by start_time;
|
||||
query | query_plan | is_slow_sql
|
||||
-----------------------+------------------------------------------------------------------+-------------
|
||||
call test_slow_sql(); | Datanode Name: datanode1 +| t
|
||||
| Function Scan on test_slow_sql (cost=0.25..0.26 rows=1 width=4)+|
|
||||
| +|
|
||||
| |
|
||||
SELECT ? | Datanode Name: datanode1 +| f
|
||||
| Result (cost=0.00..0.01 rows=1 width=0) +|
|
||||
| +|
|
||||
| |
|
||||
SELECT pg_sleep(?) | Datanode Name: datanode1 +| t
|
||||
| Result (cost=0.00..0.01 rows=1 width=0) +|
|
||||
| +|
|
||||
| |
|
||||
call test_slow_sql(); | Datanode Name: datanode1 +| t
|
||||
| Function Scan on test_slow_sql (cost=0.25..0.26 rows=1 width=4)+|
|
||||
| +|
|
||||
| |
|
||||
SELECT pg_sleep(?) | Datanode Name: datanode1 +| t
|
||||
| Result (cost=0.00..0.01 rows=1 width=0) +|
|
||||
| +|
|
||||
| |
|
||||
(5 rows)
|
||||
select query, query_plan, is_slow_sql from statement_history where parent_query_id != 0 order by start_time;
|
||||
query | query_plan | is_slow_sql
|
||||
--------------------+------------------------------------------+-------------
|
||||
SELECT ? | Datanode Name: datanode1 +| f
|
||||
| Result (cost=0.00..0.01 rows=1 width=0)+|
|
||||
| +|
|
||||
| |
|
||||
SELECT pg_sleep(?) | Datanode Name: datanode1 +| t
|
||||
| Result (cost=0.00..0.01 rows=1 width=0)+|
|
||||
| +|
|
||||
| |
|
||||
SELECT pg_sleep(?) | Datanode Name: datanode1 +| t
|
||||
| Result (cost=0.00..0.01 rows=1 width=0)+|
|
||||
| +|
|
||||
| |
|
||||
(3 rows)
|
||||
|
||||
delete from statement_history;
|
||||
set track_stmt_stat_level = 'L1,L1';
|
||||
@ -83,7 +75,7 @@ call test_exec_plsql();
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
@ -114,7 +106,7 @@ call test_exec_perform();
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
@ -145,7 +137,7 @@ call test_return_query();
|
||||
9909 | data9909
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
@ -185,7 +177,7 @@ NOTICE: id: 9909, name: data9909
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
@ -220,7 +212,7 @@ NOTICE: column_value: data9909
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
@ -257,7 +249,7 @@ NOTICE: (9909)
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
@ -290,7 +282,7 @@ call test_exec_dynexecsql(1);
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
@ -326,7 +318,7 @@ NOTICE: column_value: data9909
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
@ -368,7 +360,7 @@ referenced column: proc_pkg
|
||||
|
||||
(1 row)
|
||||
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
pg_sleep
|
||||
----------
|
||||
|
||||
|
@ -25,8 +25,8 @@ call test_slow_sql();
|
||||
-- record slow sql
|
||||
set track_stmt_stat_level = 'OFF,L1';
|
||||
call test_slow_sql();
|
||||
call pg_sleep(0.1);
|
||||
select query, query_plan, is_slow_sql from statement_history where query_plan is not null order by start_time;
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan, is_slow_sql from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
set track_stmt_stat_level = 'L1,L1';
|
||||
@ -40,7 +40,7 @@ INSERT INTO big_table (column1, column2) SELECT generate_series(1, 10000), 'data
|
||||
end;
|
||||
/
|
||||
call test_exec_plsql();
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
@ -53,7 +53,7 @@ PERFORM pg_sleep(0.1);
|
||||
END;
|
||||
/
|
||||
call test_exec_perform();
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
@ -67,7 +67,7 @@ RETURN QUERY SELECT column1, column2 FROM big_table WHERE column1 = 9909 ORDER B
|
||||
END;
|
||||
$$;
|
||||
call test_return_query();
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
@ -88,7 +88,7 @@ CLOSE cur;
|
||||
END;
|
||||
/
|
||||
call test_exec_open();
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
@ -104,7 +104,7 @@ END LOOP;
|
||||
END;
|
||||
/
|
||||
call test_exec_fors();
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
@ -122,7 +122,7 @@ END LOOP;
|
||||
END;
|
||||
/
|
||||
call test_exec_forc();
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
@ -137,7 +137,7 @@ EXECUTE sql_stmt;
|
||||
END;
|
||||
/
|
||||
call test_exec_dynexecsql(1);
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
@ -155,7 +155,7 @@ END LOOP;
|
||||
END;
|
||||
/
|
||||
call test_exec_dynfors();
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
||||
|
||||
@ -178,6 +178,6 @@ proc_pkg();
|
||||
end test_proc_in_pkg;
|
||||
/
|
||||
select test_proc_in_pkg.proc_pkg();
|
||||
call pg_sleep(0.1);
|
||||
call pg_sleep(0.2);
|
||||
select query, query_plan from statement_history where parent_query_id != 0 order by start_time;
|
||||
delete from statement_history;
|
Reference in New Issue
Block a user