[buddypress-trac] [BuddyPress Trac] #6789: XProfile: do not store serialized arrays for multi-value profile field data

buddypress-trac noreply at wordpress.org
Wed Jul 27 12:58:22 UTC 2016


#6789: XProfile: do not store serialized arrays for multi-value profile field data
------------------------------+-----------------------------
 Reporter:  Offereins         |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Future Release
Component:  Extended Profile  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |
------------------------------+-----------------------------

Comment (by thomaslhotta):

 It's possible to do this using "LIKE". This probably does not offer the
 best performance, but it also doesn't require any of the changes listed
 above.

 Right now this only works with "OR" relations if one wants to search for
 multiple values. When using "AND" every value causes a new JOIN, what
 really kills performance. The reason for this is found in
 BP_XProfile_Query on line 519:

 {{{
  } elseif ( isset( $sibling['field_id'] ) && isset( $clause['field_id'] )
 && $sibling['field_id'] === $clause['field_id'] ) {
      $compatible_compares = array( '!=', 'NOT IN', 'NOT LIKE' );
  }
 }}}

 Adding "LIKE" her allows "AND" queries to work fine.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6789#comment:7>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list