DEV Community

wanglei
wanglei

Posted on

MOT JIT Diagnostics

mot_jit_detail
This built-in function is used to query the details about JIT compilation (code generation).

Usage Examples

select * from mot_jit_detail();

select proc_oid, substr(query, 0, 50), namespace, jittable_status, valid_status, last_updated, plan_type, codegen_time from mot_jit_detail();
Enter fullscreen mode Exit fullscreen mode

Output Description

Image description

mot_jit_profile
This built-in function is used to query the profiling data (performance data) of the query or stored procedure execution.

Usage Examples

select * from mot_jit_profile();
select proc_oid, id, parent_id, substr(query, 0, 50), namespace, weight, total, self, child_gross, child_net from mot_jit_profile();
Enter fullscreen mode Exit fullscreen mode

Output Description

Image description

Miscellaneous
Another useful system table to get information about stored procedures and functions is pg_proc.

For example, body of a stored procedure can be queried using the following query:

select proname,prosrc from pg_proc where proname='sp_call_filter_rules_100_1';

Enter fullscreen mode Exit fullscreen mode

Top comments (0)