-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-communityOriginated from the communityOriginated from the communityT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)X-blathers-triagedblathers was able to find an ownerblathers was able to find an owner
Description
Describe the problem
A new feature in Django 4.2 (to be released in April) adds obj_description to an introspection query. The new query takes on the order of ten seconds when running Django's test suite.
To Reproduce
SELECT
c.relname,
CASE
WHEN c.relispartition THEN 'p'
WHEN c.relkind IN ('m', 'v') THEN 'v'
ELSE 't'
END,
obj_description(c.oid)
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('f', 'm', 'p', 'r', 'v')
AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
AND pg_catalog.pg_table_is_visible(c.oid)Environment:
- CockroachDB version v22.2.2 and v22.1.13. (I haven't been unable to test nightly due to another slowdown).
Additional context
The run time of Django's test suite went from ~1 hour to ~7 or more hours.
#87947 may be related, however, Django's introspection query that uses col_description doesn't appear to be slow.
Jira issue: CRDB-23305
Epic CRDB-23454
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-communityOriginated from the communityOriginated from the communityT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)X-blathers-triagedblathers was able to find an ownerblathers was able to find an owner