Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate Unused Response Artifacts #7

Open
DurstDog87 opened this issue Aug 1, 2023 · 0 comments
Open

Eliminate Unused Response Artifacts #7

DurstDog87 opened this issue Aug 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@DurstDog87
Copy link
Owner

Problem:

geom is required by ST_AsMVTGeom to create an envelope from which to form tiles. However, geom then remains as an artifact in the query output sent out to the client.

Example:

WITH mvtgeom AS (
            SELECT ST_AsMVTGeom(ST_Transform(geom, 3857), ST_TileEnvelope(
                    1,1,1
                )) AS mvtgeom, *
            FROM (SELECT gid, geom FROM sch.table) AS dat --geom included in query is used by ST_AsMVTGeom
            WHERE ST_Intersects(geom, ST_Transform(ST_TileEnvelope(
                    1,1,1
            ), 4269))
        )
        SELECT ST_AsMVT(mvtgeom.*) AS mvt FROM mvtgeom; --geom included in output tuple

resulting output tuple will include both gid and geom [(<gid>, <geom>), ...]. This means more bytes sent to the client, even if they are never used.

Solution:

  • eliminate geom from output? How? But then how do we add it back if it is actually wanted?
  • leave as is? But then we are potentially sending more data to the client than is actually needed.
@DurstDog87 DurstDog87 self-assigned this Aug 1, 2023
@DurstDog87 DurstDog87 added bug Something isn't working question Further information is requested labels Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant