Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34145

$DB->get_tables performance is not good on postgres <= 9.0

    Details

      Description

      ... which then makes unit tests painfully slow.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              timhunt Tim Hunt added a comment -

              Thanks to skodak for helping with this.

              Show
              timhunt Tim Hunt added a comment - Thanks to skodak for helping with this.
              Hide
              skodak Petr Skoda added a comment -

              My phpunit execution times before the patch (OSX macports versions of PG on SSD):

              • 9.0.8 - 01:46
              • 9.1.4 - 01:03
              • 9.2beta - 01:00
              Show
              skodak Petr Skoda added a comment - My phpunit execution times before the patch (OSX macports versions of PG on SSD): 9.0.8 - 01:46 9.1.4 - 01:03 9.2beta - 01:00
              Hide
              skodak Petr Skoda added a comment - - edited

              I have also verified that the new non-portable version works for all PG versions, I think we should use the "version if" because in future we should use the more standardised query only (once we drop support for pg 9.0).

              With the patch pg 9.0.8 executes the tests in 01:00 for me too, congrats!

              Show
              skodak Petr Skoda added a comment - - edited I have also verified that the new non-portable version works for all PG versions, I think we should use the "version if" because in future we should use the more standardised query only (once we drop support for pg 9.0). With the patch pg 9.0.8 executes the tests in 01:00 for me too, congrats!
              Hide
              poltawski Dan Poltawski added a comment -

              (out of interest) How much quicker does it go for you Tim? What are your before/after times?

              Show
              poltawski Dan Poltawski added a comment - (out of interest) How much quicker does it go for you Tim? What are your before/after times?
              Hide
              timhunt Tim Hunt added a comment -

              Dev chat is here: http://moodle.org/local/chatlogs/index.php?conversationid=10522#c365835

              get_tables went from 2 seconds to about 0.02 seconds for me. It seems we have about 3 get_tables calls when starting the unit tests, so the start-up time decreased by 6 seconds for me. That makes a huge difference when you are just running a few tests.

              Show
              timhunt Tim Hunt added a comment - Dev chat is here: http://moodle.org/local/chatlogs/index.php?conversationid=10522#c365835 get_tables went from 2 seconds to about 0.02 seconds for me. It seems we have about 3 get_tables calls when starting the unit tests, so the start-up time decreased by 6 seconds for me. That makes a huge difference when you are just running a few tests.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated (21, 22, 23 and master), thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (21, 22, 23 and master), thanks!
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Tested 21 install, upgrade to 22 and unit test execution under master. All working ok and speedier. Passing!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Tested 21 install, upgrade to 22 and unit test execution under master. All working ok and speedier. Passing!
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Congratulations your code is upstream - gold star for you!

              This issue + 79 others made it in in time for the minor releases.
              Thank you everyone involved for your exuberant efforts.

              Show
              samhemelryk Sam Hemelryk added a comment - Congratulations your code is upstream - gold star for you! This issue + 79 others made it in in time for the minor releases. Thank you everyone involved for your exuberant efforts.

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12