You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
#Save and restore query plans in PostgreSQL
2
2
3
+
##Rationale
4
+
5
+
sr_plan looks like Oracle Outline system. It can be used to lock the execution plan. It is necessary if you do not trust the planner or able to form a better plan.
6
+
3
7
##Build
4
8
5
9
Dependencies: >= Python 3.2, Mako, pycparser
@@ -31,7 +35,7 @@ If you want to save the query plan is necessary to set the variable:
31
35
```SQL
32
36
setsr_plan.write_mode= true;
33
37
```
34
-
Now plans for all subsequentrequests will be stored in the table sr_plans.It must be rememberedthat allrequests will bemaintained including duplicates.
38
+
Now plans for all subsequentqueries will be stored in the table sr_plans.Don't forgetthat allqueries will bestored including duplicates.
1783086253 | f | t |select query_hashfrom sr_planswhere query_hash=10; | Bitmap Heap Scanon sr_plans+
54
+
| | | | Recheck Cond: (query_hash=10)+
55
+
| | | |-> Bitmap Index Scanon sr_plans_query_hash_idx+
56
+
| | | | Index Cond: (query_hash=10)+
57
+
| | | |
58
+
46
59
```
60
+
47
61
explain_jsonb_plan function allows you to display explain execute the plan of which lies in jsonb. By default, all the plans are off, you need enable it: