You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "Hongxu Ma (JIRA)" <ji...@apache.org> on 2017/01/20 08:34:26 UTC

[jira] [Closed] (HAWQ-1286) Reduce unnecessary calls of namespace check when run \d

     [ https://issues.apache.org/jira/browse/HAWQ-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hongxu Ma closed HAWQ-1286.
---------------------------
    Resolution: Fixed

> Reduce unnecessary calls of namespace check when run \d
> -------------------------------------------------------
>
>                 Key: HAWQ-1286
>                 URL: https://issues.apache.org/jira/browse/HAWQ-1286
>             Project: Apache HAWQ
>          Issue Type: Sub-task
>          Components: Security
>            Reporter: Hongxu Ma
>            Assignee: Hongxu Ma
>             Fix For: backlog
>
>
> After HAWQ-1279 is done, current schema is no cached in current session.
> But it cause too many calls of namespace check to send in run \d , most of them are unnecessary (e.g. repeat check usage right of public schema).
> So we should reduce those unnecessary calls.
> \d case
> {code}
> \d:
>     select version()
>     SELECT n.nspname as \"Schema\",\n  c.relname as \"Name\",\n  CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as \"Type\",\n  pg_catalog.pg_get_userbyid(c.relowner) as \"Owner\"\nFROM pg_catalog.pg_class c\n     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\nWHERE c.relkind IN ('r','v','S','')\n      AND n.nspname <> 'pg_catalog'\n      AND n.nspname <> 'information_schema'\n      AND n.nspname !~ '^pg_toast'\n  AND pg_catalog.pg_table_is_visible(c.oid)\nORDER BY 1,2;
>         recomputeNamespacePath()
>         recomputeNamespacePath()
>         .... recompute many times in this long select sql
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)