File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed
coderd/database/migrations Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -35,22 +35,3 @@ CREATE INDEX idx_audit_logs_time_desc ON audit_logs USING btree ("time" DESC);
35
35
CREATE INDEX idx_audit_log_user_id ON audit_logs USING btree (user_id);
36
36
CREATE INDEX idx_audit_log_organization_id ON audit_logs USING btree (organization_id);
37
37
CREATE INDEX idx_audit_log_resource_id ON audit_logs USING btree (resource_id);
38
-
39
- -- count_estimate returns the number of rows the query planner estimates the
40
- -- provided query will return.
41
- CREATE FUNCTION count_estimate (query text )
42
- RETURNS integer
43
- LANGUAGE plpgsql AS
44
- $func$
45
- DECLARE
46
- rec record;
47
- rows integer ;
48
- BEGIN
49
- FOR rec IN EXECUTE ' EXPLAIN ' || query LOOP
50
- rows := substring (rec." QUERY PLAN" FROM ' rows=([[:digit:]]+)' );
51
- EXIT WHEN rows IS NOT NULL ;
52
- END LOOP;
53
-
54
- RETURN rows;
55
- END
56
- $func$;
You can’t perform that action at this time.
0 commit comments