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

$db->subString() used in several places where 'like' would be significant faster

    XMLWordPrintable

Details

    Description

      Both in eZContentTreenNode and in eZSearch this function is used where a 'like' would be much faster.

      Reason is simple, sql 'substring' does not use index while 'like' does!
      (Tested in mysql and oracle)

      Example from eZSearch:

      ( substring( ezcontentobject_tree.path_string from 1 for 18 ) = '/1/2/481950/66/72/' )
      

      Should be something like:

      ( ezcontentobject_tree.path_string like '/1/2/481950/66/72/%' )
      

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: