Redshift Observatory

System Table Tracker

System view pg_catalog.svl_query_report version 1.0.75655 / 2024-10-04

schema name column data type
pg_catalog svl_query_report bytes int8
pg_catalog svl_query_report elapsed_time int8
pg_catalog svl_query_report end_time timestamp
pg_catalog svl_query_report is_delayed_scan char(1)
pg_catalog svl_query_report is_diskbased char(1)
pg_catalog svl_query_report is_rrscan char(1)
pg_catalog svl_query_report label varchar(164)
pg_catalog svl_query_report query int4
pg_catalog svl_query_report rows int8
pg_catalog svl_query_report rows_pre_filter int8
pg_catalog svl_query_report segment int4
pg_catalog svl_query_report slice int4
pg_catalog svl_query_report start_time timestamp
pg_catalog svl_query_report step int4
pg_catalog svl_query_report userid int4
pg_catalog svl_query_report workmem int8

View Text

((((((((((((((((((((SELECT stl_aggr.userid,
                           stl_aggr.query,
                           stl_aggr.slice,
                           stl_aggr.segment,
                           stl_aggr.step,
                           stl_aggr.starttime AS start_time,
                           stl_aggr.endtime AS end_time,
                           date_diff(CAST('microseconds' AS text),
                                     stl_aggr.starttime,
                                     stl_aggr.endtime) AS elapsed_time,
                           stl_aggr.rows,
                           stl_aggr.bytes,
                           CAST(CAST('aggr   tbl=' AS text) || CAST(stl_aggr.tbl AS text) AS varchar) AS label,
                           stl_aggr.is_diskbased,
                           stl_aggr.workmem,
                           CAST('f' AS bpchar) AS is_rrscan,
                           CAST('f' AS bpchar) AS is_delayed_scan,
                           0 AS rows_pre_filter
                    FROM stl_aggr

                    UNION ALL

                    SELECT stl_bcast.userid,
                           stl_bcast.query,
                           stl_bcast.slice,
                           stl_bcast.segment,
                           stl_bcast.step,
                           stl_bcast.starttime AS start_time,
                           stl_bcast.endtime AS end_time,
                           date_diff(CAST('microseconds' AS text),
                                     stl_bcast.starttime,
                                     stl_bcast.endtime) AS elapsed_time,
                           stl_bcast.rows,
                           stl_bcast.bytes,
                           CAST('bcast               ' AS varchar) AS label,
                           CAST('f' AS bpchar) AS is_diskbased,
                           0 AS workmem,
                           CAST('f' AS bpchar) AS is_rrscan,
                           CAST('f' AS bpchar) AS is_delayed_scan,
                           0 AS rows_pre_filter
                    FROM stl_bcast)

                   UNION ALL

                   SELECT stl_delete.userid,
                          stl_delete.query,
                          stl_delete.slice,
                          stl_delete.segment,
                          stl_delete.step,
                          stl_delete.starttime AS start_time,
                          stl_delete.endtime AS end_time,
                          date_diff(CAST('microseconds' AS text),
                                    stl_delete.starttime,
                                    stl_delete.endtime) AS elapsed_time,
                          stl_delete.rows,
                          0 AS bytes,
                          CAST(CAST('delete tbl=' AS text) || CAST(stl_delete.tbl AS text) AS varchar) AS label,
                          CAST('f' AS bpchar) AS is_diskbased,
                          0 AS workmem,
                          CAST('f' AS bpchar) AS is_rrscan,
                          CAST('f' AS bpchar) AS is_delayed_scan,
                          0 AS rows_pre_filter
                   FROM stl_delete)

                  UNION ALL

                  SELECT stl_dist.userid,
                         stl_dist.query,
                         stl_dist.slice,
                         stl_dist.segment,
                         stl_dist.step,
                         stl_dist.starttime AS start_time,
                         stl_dist.endtime AS end_time,
                         date_diff(CAST('microseconds' AS text),
                                   stl_dist.starttime,
                                   stl_dist.endtime) AS elapsed_time,
                         stl_dist.rows,
                         stl_dist.bytes,
                         CAST('dist                ' AS varchar) AS label,
                         CAST('f' AS bpchar) AS is_diskbased,
                         0 AS workmem,
                         CAST('f' AS bpchar) AS is_rrscan,
                         CAST('f' AS bpchar) AS is_delayed_scan,
                         0 AS rows_pre_filter
                  FROM stl_dist)

                 UNION ALL

                 SELECT stl_hash.userid,
                        stl_hash.query,
                        stl_hash.slice,
                        stl_hash.segment,
                        stl_hash.step,
                        stl_hash.starttime AS start_time,
                        stl_hash.endtime AS end_time,
                        date_diff(CAST('microseconds' AS text),
                                  stl_hash.starttime,
                                  stl_hash.endtime) AS elapsed_time,
                        stl_hash.rows,
                        stl_hash.bytes,
                        CAST(CAST('hash   tbl=' AS text) || CAST(stl_hash.tbl AS text) AS varchar) AS label,
                        stl_hash.is_diskbased,
                        stl_hash.workmem,
                        CAST('f' AS bpchar) AS is_rrscan,
                        CAST('f' AS bpchar) AS is_delayed_scan,
                        0 AS rows_pre_filter
                 FROM stl_hash)

                UNION ALL

                SELECT stl_hashjoin.userid,
                       stl_hashjoin.query,
                       stl_hashjoin.slice,
                       stl_hashjoin.segment,
                       stl_hashjoin.step,
                       stl_hashjoin.starttime AS start_time,
                       stl_hashjoin.endtime AS end_time,
                       date_diff(CAST('microseconds' AS text),
                                 stl_hashjoin.starttime,
                                 stl_hashjoin.endtime) AS elapsed_time,
                       stl_hashjoin.rows,
                       0 AS bytes,
                       CAST(CAST('hjoin  tbl=' AS text) || CAST(stl_hashjoin.tbl AS text) AS varchar) AS label,
                       CAST('f' AS bpchar) AS is_diskbased,
                       0 AS workmem,
                       CAST('f' AS bpchar) AS is_rrscan,
                       CAST('f' AS bpchar) AS is_delayed_scan,
                       0 AS rows_pre_filter
                FROM stl_hashjoin)

               UNION ALL

               SELECT stl_insert.userid,
                      stl_insert.query,
                      stl_insert.slice,
                      stl_insert.segment,
                      stl_insert.step,
                      stl_insert.starttime AS start_time,
                      stl_insert.endtime AS end_time,
                      date_diff(CAST('microseconds' AS text),
                                stl_insert.starttime,
                                stl_insert.endtime) AS elapsed_time,
                      stl_insert.rows,
                      0 AS bytes,
                      CAST(CAST('insert tbl=' AS text) || CAST(stl_insert.tbl AS text) AS varchar) AS label,
                      CAST('f' AS bpchar) AS is_diskbased,
                      0 AS workmem,
                      CAST('f' AS bpchar) AS is_rrscan,
                      CAST('f' AS bpchar) AS is_delayed_scan,
                      0 AS rows_pre_filter
               FROM stl_insert)

              UNION ALL

              SELECT stl_limit.userid,
                     stl_limit.query,
                     stl_limit.slice,
                     stl_limit.segment,
                     stl_limit.step,
                     stl_limit.starttime AS start_time,
                     stl_limit.endtime AS end_time,
                     date_diff(CAST('microseconds' AS text),
                               stl_limit.starttime,
                               stl_limit.endtime) AS elapsed_time,
                     stl_limit.rows,
                     0 AS bytes,
                     CAST('limit               ' AS varchar) AS label,
                     CAST('f' AS bpchar) AS is_diskbased,
                     0 AS workmem,
                     CAST('f' AS bpchar) AS is_rrscan,
                     CAST('f' AS bpchar) AS is_delayed_scan,
                     0 AS rows_pre_filter
              FROM stl_limit)

             UNION ALL

             SELECT stl_merge.userid,
                    stl_merge.query,
                    stl_merge.slice,
                    stl_merge.segment,
                    stl_merge.step,
                    stl_merge.starttime AS start_time,
                    stl_merge.endtime AS end_time,
                    date_diff(CAST('microseconds' AS text),
                              stl_merge.starttime,
                              stl_merge.endtime) AS elapsed_time,
                    stl_merge.rows,
                    0 AS bytes,
                    CAST('merge               ' AS varchar) AS label,
                    CAST('f' AS bpchar) AS is_diskbased,
                    0 AS workmem,
                    CAST('f' AS bpchar) AS is_rrscan,
                    CAST('f' AS bpchar) AS is_delayed_scan,
                    0 AS rows_pre_filter
             FROM stl_merge)

            UNION ALL

            SELECT stl_mergejoin.userid,
                   stl_mergejoin.query,
                   stl_mergejoin.slice,
                   stl_mergejoin.segment,
                   stl_mergejoin.step,
                   stl_mergejoin.starttime AS start_time,
                   stl_mergejoin.endtime AS end_time,
                   date_diff(CAST('microseconds' AS text),
                             stl_mergejoin.starttime,
                             stl_mergejoin.endtime) AS elapsed_time,
                   stl_mergejoin.rows,
                   0 AS bytes,
                   CAST(CAST('mjoin  tbl=' AS text) || CAST(stl_mergejoin.tbl AS text) AS varchar) AS label,
                   CAST('f' AS bpchar) AS is_diskbased,
                   0 AS workmem,
                   CAST('f' AS bpchar) AS is_rrscan,
                   CAST('f' AS bpchar) AS is_delayed_scan,
                   0 AS rows_pre_filter
            FROM stl_mergejoin)

           UNION ALL

           SELECT stl_nestloop.userid,
                  stl_nestloop.query,
                  stl_nestloop.slice,
                  stl_nestloop.segment,
                  stl_nestloop.step,
                  stl_nestloop.starttime AS start_time,
                  stl_nestloop.endtime AS end_time,
                  date_diff(CAST('microseconds' AS text),
                            stl_nestloop.starttime,
                            stl_nestloop.endtime) AS elapsed_time,
                  stl_nestloop.rows,
                  0 AS bytes,
                  CAST(CAST('nloop  tbl=' AS text) || CAST(stl_nestloop.tbl AS text) AS varchar) AS label,
                  CAST('f' AS bpchar) AS is_diskbased,
                  0 AS workmem,
                  CAST('f' AS bpchar) AS is_rrscan,
                  CAST('f' AS bpchar) AS is_delayed_scan,
                  0 AS rows_pre_filter
           FROM stl_nestloop)

          UNION ALL

          SELECT stl_parse.userid,
                 stl_parse.query,
                 stl_parse.slice,
                 stl_parse.segment,
                 stl_parse.step,
                 stl_parse.starttime AS start_time,
                 stl_parse.endtime AS end_time,
                 date_diff(CAST('microseconds' AS text),
                           stl_parse.starttime,
                           stl_parse.endtime) AS elapsed_time,
                 stl_parse.rows,
                 0 AS bytes,
                 CAST('parse               ' AS varchar) AS label,
                 CAST('f' AS bpchar) AS is_diskbased,
                 0 AS workmem,
                 CAST('f' AS bpchar) AS is_rrscan,
                 CAST('f' AS bpchar) AS is_delayed_scan,
                 0 AS rows_pre_filter
          FROM stl_parse)

         UNION ALL

         SELECT stl_scan.userid,
                stl_scan.query,
                stl_scan.slice,
                stl_scan.segment,
                stl_scan.step,
                stl_scan.starttime AS start_time,
                stl_scan.endtime AS end_time,
                date_diff(CAST('microseconds' AS text),
                          stl_scan.starttime,
                          stl_scan.endtime) AS elapsed_time,
                stl_scan.rows,
                stl_scan.bytes,
                CAST(CASE
                       WHEN stl_scan.type = 19
                         THEN CAST('scan   udf=' AS text) || CAST(stl_scan.tbl AS text)
                       ELSE ((CAST('scan   tbl=' AS text) || CAST(stl_scan.tbl AS text)) || CAST(' name=' AS text)) || CAST(stl_scan.perm_table_name AS text)
                     END AS varchar) AS label,
                CAST('f' AS bpchar) AS is_diskbased,
                0 AS workmem,
                stl_scan.is_rrscan,
                stl_scan.is_delayed_scan,
                stl_scan.rows_pre_filter
         FROM stl_scan)

        UNION ALL

        SELECT stl_project.userid,
               stl_project.query,
               stl_project.slice,
               stl_project.segment,
               stl_project.step,
               stl_project.starttime AS start_time,
               stl_project.endtime AS end_time,
               date_diff(CAST('microseconds' AS text),
                         stl_project.starttime,
                         stl_project.endtime) AS elapsed_time,
               stl_project.rows,
               0 AS bytes,
               CAST('project             ' AS varchar) AS label,
               CAST('f' AS bpchar) AS is_diskbased,
               0 AS workmem,
               CAST('f' AS bpchar) AS is_rrscan,
               CAST('f' AS bpchar) AS is_delayed_scan,
               0 AS rows_pre_filter
        FROM stl_project)

       UNION ALL

       SELECT stl_return.userid,
              stl_return.query,
              stl_return.slice,
              stl_return.segment,
              stl_return.step,
              stl_return.starttime AS start_time,
              stl_return.endtime AS end_time,
              date_diff(CAST('microseconds' AS text),
                        stl_return.starttime,
                        stl_return.endtime) AS elapsed_time,
              stl_return.rows,
              stl_return.bytes,
              CAST('return              ' AS varchar) AS label,
              CAST('f' AS bpchar) AS is_diskbased,
              0 AS workmem,
              CAST('f' AS bpchar) AS is_rrscan,
              CAST('f' AS bpchar) AS is_delayed_scan,
              0 AS rows_pre_filter
       FROM stl_return)

      UNION ALL

      SELECT stl_save.userid,
             stl_save.query,
             stl_save.slice,
             stl_save.segment,
             stl_save.step,
             stl_save.starttime AS start_time,
             stl_save.endtime AS end_time,
             date_diff(CAST('microseconds' AS text),
                       stl_save.starttime,
                       stl_save.endtime) AS elapsed_time,
             stl_save.rows,
             stl_save.bytes,
             CAST(CAST('save   tbl=' AS text) || CAST(stl_save.tbl AS text) AS varchar) AS label,
             stl_save.is_diskbased,
             stl_save.workmem,
             CAST('f' AS bpchar) AS is_rrscan,
             CAST('f' AS bpchar) AS is_delayed_scan,
             0 AS rows_pre_filter
      FROM stl_save)

     UNION ALL

     SELECT stl_sort.userid,
            stl_sort.query,
            stl_sort.slice,
            stl_sort.segment,
            stl_sort.step,
            stl_sort.starttime AS start_time,
            stl_sort.endtime AS end_time,
            date_diff(CAST('microseconds' AS text),
                      stl_sort.starttime,
                      stl_sort.endtime) AS elapsed_time,
            stl_sort.rows,
            stl_sort.bytes,
            CAST(CAST('sort   tbl=' AS text) || CAST(stl_sort.tbl AS text) AS varchar) AS label,
            stl_sort.is_diskbased,
            stl_sort.workmem,
            CAST('f' AS bpchar) AS is_rrscan,
            CAST('f' AS bpchar) AS is_delayed_scan,
            0 AS rows_pre_filter
     FROM stl_sort)

    UNION ALL

    SELECT stl_unique.userid,
           stl_unique.query,
           stl_unique.slice,
           stl_unique.segment,
           stl_unique.step,
           stl_unique.starttime AS start_time,
           stl_unique.endtime AS end_time,
           date_diff(CAST('microseconds' AS text),
                     stl_unique.starttime,
                     stl_unique.endtime) AS elapsed_time,
           stl_unique.rows,
           0 AS bytes,
           CAST('unique              ' AS varchar) AS label,
           stl_unique.is_diskbased,
           stl_unique.workmem,
           CAST('f' AS bpchar) AS is_rrscan,
           CAST('f' AS bpchar) AS is_delayed_scan,
           0 AS rows_pre_filter
    FROM stl_unique)

   UNION ALL

   SELECT stl_window.userid,
          stl_window.query,
          stl_window.slice,
          stl_window.segment,
          stl_window.step,
          stl_window.starttime AS start_time,
          stl_window.endtime AS end_time,
          date_diff(CAST('microseconds' AS text),
                    stl_window.starttime,
                    stl_window.endtime) AS elapsed_time,
          stl_window.rows,
          0 AS bytes,
          CAST('window              ' AS varchar) AS label,
          stl_window.is_diskbased,
          stl_window.workmem,
          CAST('f' AS bpchar) AS is_rrscan,
          CAST('f' AS bpchar) AS is_delayed_scan,
          0 AS rows_pre_filter
   FROM stl_window)

  UNION ALL

  SELECT stl_unnest.userid,
         stl_unnest.query,
         stl_unnest.slice,
         stl_unnest.segment,
         stl_unnest.step,
         stl_unnest.starttime AS start_time,
         stl_unnest.endtime AS end_time,
         date_diff(CAST('microseconds' AS text),
                   stl_unnest.starttime,
                   stl_unnest.endtime) AS elapsed_time,
         stl_unnest.rows,
         0 AS bytes,
         CAST('unnest              ' AS varchar) AS label,
         CAST('f' AS bpchar) AS is_diskbased,
         0 AS workmem,
         CAST('f' AS bpchar) AS is_rrscan,
         CAST('f' AS bpchar) AS is_delayed_scan,
         0 AS rows_pre_filter
  FROM stl_unnest)

 UNION ALL

 SELECT stl_rtree.userid,
        stl_rtree.query,
        stl_rtree.slice,
        stl_rtree.segment,
        stl_rtree.step,
        stl_rtree.starttime AS start_time,
        stl_rtree.endtime AS end_time,
        date_diff(CAST('microseconds' AS text),
                  stl_rtree.starttime,
                  stl_rtree.endtime) AS elapsed_time,
        stl_rtree.rows,
        stl_rtree.bytes,
        CAST(CAST('rtree  tbl=' AS text) || CAST(stl_rtree.tbl AS text) AS varchar) AS label,
        stl_rtree.is_diskbased,
        stl_rtree.workmem,
        CAST('f' AS bpchar) AS is_rrscan,
        CAST('f' AS bpchar) AS is_delayed_scan,
        0 AS rows_pre_filter
 FROM stl_rtree)

UNION ALL

SELECT stl_spatial_join.userid,
       stl_spatial_join.query,
       stl_spatial_join.slice,
       stl_spatial_join.segment,
       stl_spatial_join.step,
       stl_spatial_join.starttime AS start_time,
       stl_spatial_join.endtime AS end_time,
       date_diff(CAST('microseconds' AS text),
                 stl_spatial_join.starttime,
                 stl_spatial_join.endtime) AS elapsed_time,
       stl_spatial_join.rows,
       0 AS bytes,
       CAST(CAST('spatial_join   tbl=' AS text) || CAST(stl_spatial_join.tbl AS text) AS varchar) AS label,
       CAST('f' AS bpchar) AS is_diskbased,
       0 AS workmem,
       CAST('f' AS bpchar) AS is_rrscan,
       CAST('f' AS bpchar) AS is_delayed_scan,
       0 AS rows_pre_filter
FROM stl_spatial_join


Home 3D Друк Blog Bring-Up Times Consultancy Cross-Region Benchmarks Email Forums IRC Mailing Lists Reddit Redshift Price Tracker Redshift Version Tracker Redshift Workbench System Table Tracker The Known Universe Twitter White Papers