Opened 7 years ago

Closed 7 years ago

#27443 closed New feature (needsinfo)

support executing ANALYZE on tables

Reported by: Denis Cornehl Owned by: Denis Cornehl
Component: Database layer (models, ORM) Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

ANALYZE (or a different name for differend databases) updates table statistics.

It's useful to keep database performance fast, especially for more complex queries, and if much data has changed.

This ticket is about adding an easy convenient method to update these statistics for the common database backends.

this is needed for #26451 and #27442

Change History (4)

comment:1 by Simon Charette, 7 years ago

I suppose a migration operation that could be added after a RunPython one altering a lot of rows could be useful. I'm just not sure whether or not this is best left to DBAs and shouldn't be dealt with Django.

comment:2 by Denis Cornehl, 7 years ago

¬Simon a migration op is a good idea.

Are there still DBAs around these days? :)

I personally can see use cases to deal with this in django, especially after someone did many changes to a db.
Talked to Michael Manfre and he to Joshua Smeaton and both were not opposed to the idea and it's use.

comment:3 by Tim Graham, 7 years ago

Are changes required to Django to implement this or could a third-party app could suffice for now?

comment:4 by Tim Graham, 7 years ago

Resolution: needsinfo
Status: assignedclosed

Let's reopen this ticket if there's a working implementation and consensus on the DevelopersMailingList that this should be part of Django.

Note: See TracTickets for help on using tickets.
Back to Top