Project

General

Profile

Actions

Bug #89846

closed

Missing database indices

Added by Jonas Eberle almost 5 years ago. Updated about 1 year ago.

Status:
Rejected
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2019-12-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
SQL index indices
Complexity:
Is Regression:
Sprint Focus:

Description

While checking https://review.typo3.org/c/Packages/TYPO3.CMS/+/62532 I found some more missing indices.

I'll happily take care of this and keep this open until the release of 10 LTS.

Minimal test setup:

  # use introduction package as test base
  composer req typo3/cms-introduction
  ddev exec -s db sh <<< "mysql -e 'SET GLOBAL log_queries_not_using_indexes=ON;'" 
  ddev logs -s db -f
  # crawl frontend
  wget \
                                -nv -e robots=off -R.css,.js,.jpg,.png,.pdf -nd -r \
                                --delete-after --level=5
  # run backend acceptance tests (mariadb)
  /Build/Scripts/runTests.sh -s acceptance
  # run functional tests with different DB systems  # ignores mssql|postgres|sqlite
  /Build/Scripts/runTests.sh -s functional mariadb
  /Build/Scripts/runTests.sh -s functional mysql55

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #88896: Add index to slug fieldClosed2019-08-02

Actions
Related to TYPO3 Core - Bug #89853: Add index on new l10n_source fieldClosed2019-12-05

Actions
Actions #1

Updated by Jonas Eberle almost 5 years ago

  • Related to Task #88896: Add index to slug field added
Actions #2

Updated by Riccardo De Contardi almost 5 years ago

  • Assignee set to Jonas Eberle
Actions #3

Updated by Jonas Eberle almost 5 years ago

  • Related to Bug #89853: Add index on new l10n_source field added
Actions #4

Updated by Jonas Eberle almost 5 years ago

Ignore the first post. ddev was not the way to go.

Here's the setup I use:

In Build/Scripts/runTests.sh I added

docker-compose run mariadb10_enablelog

after
# line 280
docker-compose run prepare_acceptance_backend_mariadb10

and
# line 397
docker-compose run prepare_functional_mariadb10

and added the lines
docker-compose exec mariadb10 sh -c 'cat /var/log/mysql/mariadb-slow.log' > mariadb-slow.log
read -p "Logs written to ‹mariadb-slow.log›. Press ENTER to tear down docker-compose." 

in front of the following docker-compose down

Then in Build/testing-docker/local/docker-compose.yml

I added that service:

  mariadb10_enablelog:
    image: mariadb:10.3
    links:
      - mariadb10
    command: >
      sh -c " 
        echo Setting log_queries_not_using_indexes=ON... && \
          mysql -hmariadb10 -uroot -pfuncp -e 'SET GLOBAL log_queries_not_using_indexes=ON;';
        echo Setting slow_query_log=ON... && \
          mysql -hmariadb10 -uroot -pfuncp -e 'SET GLOBAL slow_query_log=ON;';
        # debug:
        mysql -hmariadb10 -uroot -pfuncp -e 'SHOW VARIABLES;';
      " 

Then I would run the tests as usual:

Build/Scripts/runTests.sh -s acceptance
Build/Scripts/runTests.sh -s functional

If you want to see the output while tests are running, run this from directory Build/testing-docker/local:

docker-compose exec mariadb10 sh -c 'tail -F /var/log/mysql/mariadb-slow.log' | grep -i 'from' | grep -Ev 'tx_styleguide|information_schema'

Actions #5

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63353

Actions #6

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63353

Actions #7

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63353

Actions #8

Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63353

Actions #9

Updated by Gerrit Code Review over 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63353

Actions #10

Updated by Gerrit Code Review over 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63353

Actions #11

Updated by Gerrit Code Review almost 3 years ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63353

Actions #12

Updated by Christian Kuhn about 1 year ago

  • Status changed from Under Review to Rejected

Patch was stalled and the approach is a bit questionable in the first place. Closing here for now.

Actions

Also available in: Atom PDF