Querying Data

This topic provides information about using SQL in LightDB-A databases.

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

  • About LightDB-A Query Processing
    This topic provides an overview of how LightDB-A Database processes queries. Understanding this process can be useful when writing and tuning queries.
  • About GPORCA
    In LightDB-A Database, the default GPORCA optimizer co-exists with the Postgres Planner.
  • Defining Queries
    LightDB-A Database is based on the PostgreSQL implementation of the SQL standard.
  • WITH Queries (Common Table Expressions)
    The WITH clause provides a way to use subqueries or perform a data modifying operation in a larger SELECT query. You can also use the WITH clause in an INSERT, UPDATE, or DELETE command.
  • Using Functions and Operators
    Description of user-defined and built-in functions and operators in LightDB-A Database.
  • Working with JSON Data
    LightDB-A Database supports the json and jsonb data types that store JSON (JavaScript Object Notation) data.
  • Working with XML Data
    LightDB-A Database supports the xml data type that stores XML data.
  • Using Full Text Search
    LightDB-A Database provides data types, functions, operators, index types, and configurations for querying natural language documents.
  • Using LightDB-A MapReduce
    MapReduce is a programming model developed by Google for processing and generating large data sets on an array of commodity servers. LightDB-A MapReduce allows programmers who are familiar with the MapReduce model to write map and reduce functions and submit them to the LightDB-A Database parallel engine for processing.
  • Query Performance
    LightDB-A Database dynamically eliminates irrelevant partitions in a table and optimally allocates memory for different operators in a query.
  • Managing Spill Files Generated by Queries
    LightDB-A Database creates spill files, also known as workfiles, on disk if it does not have sufficient memory to run an SQL query in memory.
  • Query Profiling
    Examine the query plans of poorly performing queries to identify possible performance tuning opportunities.

Parent topic: LightDB-A Database Administrator Guide