Querying Data

    You enter SQL statements called queries to view and analyze data in a database using the interactive SQL client and other client tools.

    Note: HAWQ queries timeout after a period of 600 seconds. For this reason, long-running queries may appear to hang until results are processed or until the timeout period expires.

    • This topic provides an overview of how HAWQ processes queries. Understanding this process can be useful when writing and tuning queries.

    • Defining Queries

      HAWQ is based on the PostgreSQL implementation of the SQL standard. SQL commands are typically entered using the standard PostgreSQL interactive terminal psql, but other programs that have similar functionality can be used as well.

    • HAWQ dynamically allocates resources to queries. Query performance depends on several factors such as data locality, number of virtual segments used for the query and general cluster health.