DataGrip
 
Get DataGrip
You are viewing the documentation for an earlier version of DataGrip.

Code Inspection: Redundant row limiting in queries

Last modified: 13 May 2022

Reports redundant row limiting clauses like FETCH and LIMIT in queries.

Example (PostgreSQL):

To fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because the usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first N rows and this will influence the output.