jakob / jakob/Postico

Slow loading of table with large geometry objects

Open
#212 5 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
485
Forks
8
PR merge metrics
No merged PRs in 30d

Description

I have a table with 37 rows, each with a fairly large geometry. If I SELECT * FROM _table_ it takes about 15s, but if I simply load the table from the Postico browser it takes more than 30s.

My guess is that Postico is selecting the geometry ST_AsEWKT(), which is slowing the query down. If I SELECT *, ST_AsEWKT(geom) FROM _table_ the query takes approximately as long as Postico takes to load it.

I can see a few different solutions to this problem:

  1. Simply select the binary geometry
  2. If the geometry is requested and not transformed (either as a part of * or SELECT geom), return some sort of placeholder. Perhaps something like <Geometry>
  3. Similar to number 2, but return the type of geometry with SELECT GeometryType(geom)

Thank you for creating such a great product!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported timing difference between SELECT * and Postico's table loading, focusing on queries involving ST_AsEWKT(geom), binary geometry, and GeometryType(geom). Trace the table-browser query path in the Postico codebase; done means large-geometry tables load without the reported slowdown while preserving useful geometry display behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.