On Wed, Jul 24, 2019 at 6:12 PM Kristian Ejvind
wrote:
> Hi Maxim
>
>
>
> Thanks for your advice, and let me start with your second email, which
> I'll copy here:
>
>
>
> =
>
> Hi Kristian,
>
>
>
> After comparing structure of zabbix tables with same in my zabbix
> installation I found one
Hi Maxim
Thanks for your advice, and let me start with your second email, which I'll
copy here:
=
Hi Kristian,
After comparing structure of zabbix tables with same in my zabbix installation
I found one very weird difference.
Why type of events.eventid had been changed from default bigint
>
>
> All these queries execute well below 1 ms, using indexes.
>
>
>
> Let's delete one row. See explain results here:
> https://explain.depesz.com/s/aycf . 5 seconds to delete a single row,
> wow!
>
> This shows that it is the foreign key constraints on event_recovery and
> alerts that take a
Hi Kristian,
If you look for explain analyze results for delete,
you will see that 99% of time query spent on the foreign key triggers
checks.
In the same time the database have indexes on foreign key side in place.
I recommend try this:
\timing on
BEGIN;
delete from zabbix.events where
Hi.
Well, the events table has both a primary key and foreign keys referencing it,
which is not possible
on a partitioned table in postgresql 10. How did you work around this issue?
On the other hand, if we can get the deletion of rows from the events table run
at normal speed, I
can't imagine