Separate 100 M spatial data in 100 tables VS one big table

2024-03-04 Thread kimaidou
Hi list, In France, the total number of cadastral parcels is around 10 000 000 The data can be heavy, because each parcel stores a geometry (PostGIS geometry data type inside a geom column). Indexes must be created to increase performance of day-to-day requests: * GIST index on geom for spatial

Re: Is partition pruning impacted by data type

2024-03-04 Thread sud
Hello, Has anybody got experience of using a range partitioning table using timestamptz or "timestamp with no timezone" Column and saw any of such known issues in pruning? > On Tue, 5 Mar, 2024, 1:09 am sud, wrote: > >> Hi, >> We are designing one application which is currently restricted to on

Re: Optimizing count(), but Explain estimates wildly off

2024-03-04 Thread Greg Sabino Mullane
On Mon, Mar 4, 2024 at 2:14 PM Chema wrote: > There's one JSON column in each table with a couple fields, and a column > with long texts in Items. and earlier indicated the query was: > Select * from tenders inner join items You do not want to do a "select star" on both tables unless you 100

Re: Optimizing count(), but Explain estimates wildly off

2024-03-04 Thread Chema
> > > -> Parallel Seq Scan on pricescope_items (cost=0.00..1027794.01 > rows=3277101 width=522) (actual time=0.753..41654.507 rows=2621681 loops=3) > > Why does it take over 41 seconds to read a table with less than > 3 million rows? Are the rows so large? Is the tabe bloated? > What is the siz