1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Improving Query Performance in PostgreSQL

Connected

अभ्यास

Previewing a row-oriented table

When working with new tables, it is common to SELECT * to preview the data. However, selecting all the rows from a large table using row-oriented storage is resource intensive and slow. A quick optimization trick is to limit the number of rows returned.

You will be working with air quality data from the United States. This data lives in a Postgres database using row-oriented storage. Familiarize yourself with daily_aqi by previewing the data. First, select all records. Then limit the results to improve speed.

Use the EXPLAIN command to quantify the effect of limiting the rows.

निर्देश 1/2

undefined XP
  • 1

    Check the query cost estimate of a SELECT * statement.

  • 2

    Check the query cost estimate after limiting to 10 records.