query-planner Questions
1
When I run query and filter by agreement_id it is slow,
but when I filter by an alias id it is fast. (Look at the end of the query)
Why using same field when filtering cause different execution tim...
Mercy asked 11/5, 2021 at 18:45
2
Here's an example plan on explain.depesz.com:
Limit (cost=65301.950..65301.950 rows=1 width=219) (actual time=886.074..886.074 rows=0 loops=1)
-> Sort (cost=65258.840..65301.950 rows=17243 wid...
Josie asked 15/2, 2014 at 3:10
1
Solved
I am having troubles understanding how the query plan caching works for pl/pgsql.
I want to built all-in-one queries with JOINs and IFs, so I will have multiple and different query parameters, an...
Baucom asked 15/1, 2018 at 23:58
2
I do not see the bug in this implementation:
CREATE FUNCTION foo(anyelement) RETURNS SETOF int AS $f$
SELECT id FROM unnest(array[1,2,3]) t(id)
WHERE CASE WHEN (pg_typeof($1)::text)='integer' T...
Tripper asked 16/3, 2016 at 2:40
2
Solved
I make such a query
EXPLAIN (ANALYZE, BUFFERS)
SELECT COUNT(id) q, day
FROM my_table
WHERE role_id && ARRAY[15, 17]
GROUP BY "day"
ORDER BY "day" DESC;
And Postgre...
Lezlielg asked 5/11, 2015 at 16:32
1
© 2022 - 2024 — McMap. All rights reserved.