Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
RekGRpth committed Dec 16, 2024
1 parent 99996af commit d5b6f38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gp_activetable.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,8 @@ pull_active_list_from_seg(void)
Portal portal;
/* first get all oid of tables which are active table on any segment */
static const char *sql =
"select (diskquota.diskquota_fetch_table_stat(0, '{}'::oid[])).* from gp_dist_random('gp_id') group by 1";
"with s as (select (diskquota.diskquota_fetch_table_stat(0, '{}'::oid[])).* from gp_dist_random('gp_id')) "
"select \"TABLE_OID\" from s group by 1";
bool connected_in_this_function = SPI_connect_if_not_yet();

if ((plan = SPI_prepare(sql, 0, NULL)) == NULL)
Expand Down

0 comments on commit d5b6f38

Please sign in to comment.