Skip to content

[BUG] JSQLParser 5.1 : PostgreSQL : Parsing takes too long and times out #2181

@tomershay

Description

@tomershay

Parser takes a long time to parse this simple query, which causes a timeout (my default timeout is set for 20 seconds). Tested with latest version.

SELECT
  1
FROM
  public.tbl
WHERE
  fieldd ->> 'att1' = 1
  OR fieldd ->> 'att1' = 1
  OR fieldd ->> 'att1' = 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
  OR fieldd::jsonb -> 'att2' @> 1
ORDER BY
  att ASC
LIMIT
  1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions