Re: Parallel hints in PostgreSQL with consistent perfromance

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: mohini mane <mohini(dot)android(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Parallel hints in PostgreSQL with consistent perfromance
Date: 2024-01-04 01:43:21
Message-ID: CAMkU=1zNQ6j3bP62taVL1XG64RsDVzcrqDyUPgBr9bDpY=QEyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> *1st time query executed with PARALLEL DEGREE 2 *
> explain analyze select /*+* PARALLEL(A 2)* */ * from
> test_compare_all_col_src1 A;
> QUERY
> PLAN
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
> Gather (cost=10.00..45524.73 rows=949636 width=97) (actual
> time=0.673..173.017 rows=955000 loops=1)
> Workers Planned: 4
> * Workers Launched: 4*
> -> Parallel Seq Scan on test_compare_all_col_src1 a
> (cost=0.00..44565.09 rows=237409 width=97) (actual time=0.039..51.941
> rows=191000 loops=5)
> Planning Time: 0.093 ms
> * Execution Time: 209.745 ms*
> (6 rows)
>

Your alias is not enclosed in double quotes, so it is downcased to "a" (as
can be seen from the alias printed in the plan). But pg_hint_plan hints
don't follow the downcasing convention, so the hint on "A" does not match
the alias "a", and so is ignored.

Cheers,

Jeff

>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2024-01-04 02:43:15 Re: Slow GroupAggregate and Sort
Previous Message Jerry Brenner 2024-01-02 21:27:23 Re: Questions about "Output" in EXPLAIN ANALYZE VERBOSE