Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16412

ezuser - create new object mysql perf

    XMLWordPrintable

Details

    Description

      I know ez work like this but a good optimization can be done here.
      Enabled sql debug and redirect
      Create a new account:

      1) the system will create a node : 7 query
      1 insert
      2 select
      4 update
      The same job can be done with 1 insert and 1 update
      same pb with ezcontentobject_version/ezcontentobject etc etc

      2) querys are repeat several time
      SELECT contentobject_id, login, email, password_hash, password_hash_type
      FROM ezuser
      WHERE contentobject_id='new user id'

      SELECT * FROM ezuser WHERE contentobject_id='11089' AND LENGTH( login ) > 0

      3)another pb with ezcontentobject_link, the system will execute 3 query:
      this query return 0 result
      SELECT to_contentobject_id, relation_type FROM ezcontentobject_link
      WHERE contentclassattribute_id='0'
      AND from_contentobject_id='11089'
      AND from_contentobject_version='1'
      AND op_code='0'

      this query is the "same" I know it won't return any result the systeml should not run it.

      SELECT to_contentobject_id, op_code, relation_type FROM ezcontentobject_link
      WHERE contentclassattribute_id='0'
      AND from_contentobject_id='11089'
      AND from_contentobject_version='1'
      AND op_code!='0'
      ORDER BY id ASC

      We don't need to do this one because first query didn't return any result

      DELETE FROM ezcontentobject_link
      WHERE contentclassattribute_id='0'
      AND from_contentobject_id='11089'
      AND from_contentobject_version='1'

      Attachments

        Activity

          People

            unknown unknown
            jkn jkn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: