On Wed, Jun 08, 2022 at 09:44:08AM +0100, Paulo Silva wrote:
> But if I add an ORDER BY and a LIMIT something goes very wrong (Q2):
A somewhat common problem.
A common workaround is to change "ORDER BY a" to something like "ORDER BY a+0"
(if your framework will allow it).
> An EXPLAIN (ANALYZE,
Hi,
The problem is that the query is generated by the framework, I'm not sure
if I can change anything on it. Any other way to influence planner?
Regards
Ranier Vilela escreveu no dia quarta, 8/06/2022 à(s)
12:40:
> Em qua., 8 de jun. de 2022 às 05:44, Paulo Silva
> escreveu:
>
>> Hi,
>>
>>
Em qua., 8 de jun. de 2022 às 05:44, Paulo Silva
escreveu:
> Hi,
>
> I'm using PostgreSQL 14.3 and I'm getting strange behavior in a complex
> query generated by the Entity Framework.
>
> The inner (complex) query has a quick execution time:
>
> # SELECT "Extent1"."id", CAST ("Extent1"."date" AS
Hi,
I'm using PostgreSQL 14.3 and I'm getting strange behavior in a complex
query generated by the Entity Framework.
The inner (complex) query has a quick execution time:
# SELECT "Extent1"."id", CAST ("Extent1"."date" AS timestamp) AS "C3"
FROM "dbo"."ng_content" AS "Extent1"