Hi Álvaro, and ALL,
>I tested this with one million entries, and the query you proposed was
>more than 1,000 times faster.
Sorry, I just realized that I accidentally added an unnecessary filter
condition to one of the queries.
Specifically, the extra condition was:
AND n.nspname LIKE 'many_cns'
Because of this, I was not able to measure the two queries under identical
conditions. I will rerun the benchmarks and share the updated results tomorrow.
> # Summary
> The following changes are planned for the next patch:
>
> - Changed the query (using UNION ALL)
> - Changed the columns and their order (and the sort order accordingly):
> - Schema | Table | Type | Name | Definition
> - Toggle definition verbosity with the + option
> - Added a test case: \dCN cust*.order*
>
> The following items will not be included for now (as they are not critical):
>
> - Option to switch sort order
> (e.g., sort by constraint name vs. table name)
> - Improved command name checking logic
Yeah, that sounds good to me.
Hopefully, I will also be able to submit a new patch along with the revised
measurement results tomorrow.
Regards,
Tatsuro Yamada