Re: Planning time is time-consuming

2023-09-10 Thread Andreas Kretschmer
On 11 September 2023 03:15:43 CEST, Laurenz Albe wrote: >On Fri, 2023-09-08 at 18:51 +0800, Mikhail Balayan wrote: >> I have three tables: >>     - test_db_bench_1 >>     - test_db_bench_tenants >>     - test_db_bench_tenant_closure >> >> And the query to join them: >> SELECT "test_db_bench_1

Re: Planning time is time-consuming

2023-09-10 Thread Anupam b
Also, if you write sql with bind params, planning time should be once for the sql. Subsequent sql will use cached stmt. Get Outlook for Android From: Laurenz Albe Sent: Sunday, September 10, 2023 6:15:43 PM To: Mikhail Balayan ; pgsql-per

Re: Planning time is time-consuming

2023-09-10 Thread Laurenz Albe
On Fri, 2023-09-08 at 18:51 +0800, Mikhail Balayan wrote: > I have three tables: >     - test_db_bench_1 >     - test_db_bench_tenants >     - test_db_bench_tenant_closure > > And the query to join them: > SELECT "test_db_bench_1"."id" id, "test_db_bench_1"."tenant_id" >   FROM "test_db_bench_1" >

Planning time is time-consuming

2023-09-10 Thread Mikhail Balayan
Hello, I have three tables: - test_db_bench_1 - test_db_bench_tenants - test_db_bench_tenant_closure And the query to join them: SELECT "test_db_bench_1"."id" id, "test_db_bench_1"."tenant_id" FROM "test_db_bench_1" JOIN "test_db_bench_tenants" AS "tenants_child" ON (("tenants_chil