-
Bug
-
Resolution: Fixed
-
Minor
-
2.3.7, 2.4
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
-
MDL-39725_analyze -
PostgreSQL doesn't automatically create statistics for temporary tables like all other supported databases. This is due to temporary tables being session local.
When temporary tables get large, they need ANALYZE run to produce better performing database plans.
This issue appears as part of the investigation into MDL-29439. It also needs a more general solution when we are working with temporary tables.
Here are the links and summary of affected DB's for Analyzing temporary tables;
MySQL: No statistics Engine until 5.6, so I'm assuming not affecting people.
PostgreSQL: Doesn't automatically update statistics on Temporary Tables
Oracle: Does update statistics
SQL Server: Does update statistics unless you disable it.
MySQL Link: http://dev.mysql.com/doc/refman/5.6/en/glossary.html#glos_persistent_statistics
PostgreSQL Link: http://www.postgresql.org/message-id/AANLkTin5Z3ie1XBCNs=sjDL=nsbXXERVF1xVnxcE_108@mail.gmail.com
Oracle Link: http://docs.oracle.com/cd/B19306_01/server.102/b14231/tables.htm#i1006473
SQL Server Link: http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/cfa8f983-8107-4af0-91a7-b2ee915e07ea
I am not clear whether MySQL may begin to present an issue when newer versions use on disk statistics with temporary tables.
It is also worth considering that when performing function like restoring or large batch processing jobs, forcing statistics collection on other database may not be a bad thing. It can cause issues as ownership and privileges usually need to be considered.
- Discovered while testing
-
MDL-43443 mod_wiki_events_testcase::test_page_deleted fails on oracle.
- Closed
- has a non-specific relationship to
-
MDL-29439 Quiz restoration is very slow if the backup contains lots of questions
- Closed
- has been marked as being related by
-
MDL-39726 Question restoration should not use a loop over questions, it can be done once per context
- Closed
-
MDL-25373 Faster user sync in auth/db
- Closed
- will be (partly) resolved by
-
MDL-40103 Move temp table usage to create_temp_table and ensure temp tables defined with xml_table rather than install.xml
- Closed