-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
begin; | ||
load 'plan_filter'; | ||
create schema v; | ||
-- create a sample table | ||
create table v.test_table ( | ||
id serial primary key, | ||
data text | ||
); | ||
-- insert some test data | ||
insert into v.test_table (data) | ||
values ('sample1'), ('sample2'), ('sample3'); | ||
set local plan_filter.statement_cost_limit = 0.001; | ||
select * from v.test_table; | ||
ERROR: plan cost limit exceeded | ||
HINT: The plan for your query shows that it would probably have an excessive run time. This may be due to a logic error in the SQL, or it maybe just a very costly query. Rewrite your query or increase the configuration parameter "plan_filter.statement_cost_limit". | ||
rollback; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
begin; | ||
load 'plan_filter'; | ||
|
||
create schema v; | ||
|
||
-- create a sample table | ||
create table v.test_table ( | ||
id serial primary key, | ||
data text | ||
); | ||
|
||
-- insert some test data | ||
insert into v.test_table (data) | ||
values ('sample1'), ('sample2'), ('sample3'); | ||
|
||
set local plan_filter.statement_cost_limit = 0.001; | ||
|
||
select * from v.test_table; | ||
|
||
rollback; | ||
|
||
|