Feature #1265

getFromLDAP optimization for groups retrieval

Added by remi over 11 years ago. Updated over 11 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:remi% Done:

0%

Category:Authentication
Target version:0.72.1

Description

Actual process :

  • SELECT ID,ldap_field, ldap_value FROM glpi_groups
  • Build a small array with unique ldap_field
  • Build a big array with ID,ldap_field,ldap_value
  • retrieve LDAP attribute (ldap_field = small array)
  • build array with group membership (searching in the big array)

This could consume a lot of memory and time (if a lot of groups exists : > 10000)

Proposed optimized process (to be discussed)

  • SELECT DISTINCT ldap_field FROM glpi_groups
  • Build a small array with unique ldap_field
  • retrieve LDAP attribute (ldap_field)
  • for each attribute of the current user search for group ID (ldap_field,ldap_value)
  • build array with group membership

This will use more SQL query, but smaller.

A new index will be usefull on ldap_value (better cardinality than ldap_field) for this solution.

History

#1 Updated by remi over 11 years ago

  • Status changed from New to Assigned

#2 Updated by remi over 11 years ago

(In r8219) patch for LDAP/SQL optimization - see #1265

#3 Updated by remi over 11 years ago

2 indexes needed :

ALTER TABLE @glpi_groups@ ADD INDEX ( @ldap_group_dn@ )  
ALTER TABLE @glpi_groups@ ADD INDEX ( @ldap_value@ ) 

#4 Updated by remi over 11 years ago

(In r8415) getFromLDAP optimization for groups retrival, see #1265

#5 Updated by remi over 11 years ago

  • Status changed from Assigned to Closed

(In r8417) getFromLDAP optimization for groups retrival (schema), fixed #1265

#6 Updated by remi over 11 years ago

  • Status changed from Closed to Feedback

#7 Updated by moyo over 11 years ago

  • Status changed from Feedback to Closed

(In r8488) [0.72] getFromLDAP optimization for groups retrieval
fixed #1265

#8 Updated by moyo over 11 years ago

(In r8489) [0.72] getFromLDAP optimization for groups retrieval
see #1265 wrong past fixed

Also available in: Atom PDF