Re: Postgres using the wrong index index

2021-08-11 Thread Justin Pryzby
The rowcount estimate for the time column is bad for all these plans - do you know why ? You're using inheritence - have you analyzed the parent tables recently ? | Index Scan using other_events_1004175222_pim_evdef_67951aef14bc_idx on public.other_events_1004175222 (cost=0.28..1,648,877.92 rows

Re: Postgres using the wrong index index

2021-08-11 Thread Mladen Gogala
You know that you can use pg_hint_plan extension? That way you don't have to disable indexes or set session parameters. Regards On 8/11/21 3:56 PM, Matt Dupree wrote: Thanks for your response, Justin! Here's the plan if we disable the custom_2 index. It us

Re: PostgreSQL equivalent of UTL_HTTP

2021-08-11 Thread Pavel Stehule
Hi st 11. 8. 2021 v 20:57 odesílatel aditya desai napsal: > Hi, > We are migrating Oracle to PostgreSQL. We need the equivalent of UTL_HTTP. > How to invoke Web service from PostgreSQL. > > Also please let me know the PostgreSQL equivalents of below > Oracle utilities.. > > utl.logger,UTL_FILE,U

PostgreSQL equivalent of UTL_HTTP

2021-08-11 Thread aditya desai
Hi, We are migrating Oracle to PostgreSQL. We need the equivalent of UTL_HTTP. How to invoke Web service from PostgreSQL. Also please let me know the PostgreSQL equivalents of below Oracle utilities.. utl.logger,UTL_FILE,UTL_SMTP Regards, Aditya.

Re: difference between pg_triggers and information_schema.triggers

2021-08-11 Thread aditya desai
Seems like multiple entries in information_schema.triggers for INSERT/UPDATE/DELETE. Understood thanks. postgres=# select tgname,tgtype from pg_trigger; tgname | tgtype + insert_empployee | 31 insert_empployee_1 | 31 (2 rows) postgres=# selec

Re: difference between pg_triggers and information_schema.triggers

2021-08-11 Thread David G. Johnston
On Wednesday, August 11, 2021, aditya desai wrote: > Hi All, > What is the difference between pg_triggers and > information_schema.triggers? I want to list all triggers in the database. > Read the docs for information_schema.triggers. > What is the best way to list all objects in PostgreSQL?(s

difference between pg_triggers and information_schema.triggers

2021-08-11 Thread aditya desai
Hi All, What is the difference between pg_triggers and information_schema.triggers? I want to list all triggers in the database. The count differs in both. select count(1) from information_schema.triggers -55 select count(1) from pg_trigger - 48 What is the best way to list all objects in Postg

Re: Postgres using the wrong index index

2021-08-11 Thread Justin Pryzby
On Tue, Aug 10, 2021 at 12:47:20PM -0400, Matt Dupree wrote: > Here's the plan: https://explain.depesz.com/s/uNGg > > Note that the index being used is Could you show the plan if you force use of the intended index ? For example by doing begin; DROP INDEX indexbeingused; explain thequery; rollba

Postgres using the wrong index index

2021-08-11 Thread Matt Dupree
I've created a partial index that I expect the query planner to use in executing a query, but it's using another index instead. Using this other partial index results in a slower query. I'd really appreciate some help understanding why this is occurring. Thanks in advance! *Postgres Version* Post