forked from sosedoff/pgweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
A user can execute a query with a large dataset. The results are not paged in the table and large results significantly slow down the UI and therefore the user experience.
As an alternative we should suggest using a LIMIT 500 clause on statements, for example by adding it to the default / initial query:
-- Select all hubs from the latest version of the currently selected instance (in the UI)
SELECT *
FROM intf_automation.hubs h
-- Join control table to be able to filter for the latest version (snapshot)
INNER JOIN control.control_sdts cs ON h.gsr_client = cs.gsr_client AND h.gsr_inst = cs.gsr_inst AND h.gsr_sdts = cs.gsr_sdts
WHERE
h.gsr_client = @Client -- Filtering for client is not required, but good practice (we might change the behavior of Flow.BI in the future)
AND h.gsr_inst = @Instance -- Filter for the instance selected in the UI
AND cs.is_latest -- Filter for latest version (snapshot)
LIMIT 500 -- To keep the UI responsive
(also change the clauses to upper case)
Metadata
Metadata
Assignees
Labels
No labels