Re: trying to delete most of the table by range of date col

2018-09-03 Thread Carrie Berlin
Hi > > I understand about having to deal with a bad design. How big is the table > "select pg_size_pretty(pg_table_size(table_name)).? If the table is not > that large relative to the IOPS on your disk system, another solution is to > add a binary column IS_DELETED to the table and modify the que

Re: trying to delete most of the table by range of date col

2018-09-03 Thread Carrie Berlin
This is a terribley inflexible design, why so many foreign keys? If the table requires removing data, rebuild with partitions. Parent keys should be in reference tables, not in fact table. On Mon, Sep 3, 2018 at 04:51 Mariel Cherkassky wrote: > Cant drop foreign keys, there are too much. > > ‫