CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Complex Smart Group Not Working
Pages: [1]

Author Topic: Complex Smart Group Not Working  (Read 1594 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Complex Smart Group Not Working
August 13, 2009, 06:13:50 am
I have a Drupal 6 CiviCRM 2.2.7 site with a smart group called "Invite Email List (smart group)" with 4125 Group Members. It also has a regular group called "Paper Invite" with 152 Group Members. If I make a mailer and include the smart group and exclude the regular group and proceed, the page takes a long time to return and in the end it says "Total Recipients: 2,877" which is wrong.

Running this same operation on a local copy of this site shows that the MySQL is taking 100% of the CPU is for nearly 60 seconds. On the live (shared hosting) server, the page doesn't always even come back.

I am trying to determine if something has become corrupted with this smart group or if it's simply very complicated. Here are the criteria:

Code: [Select]
    * Member of Group = XXXXX Breakfast ...AND...  Contact Type - 'Individual'

    * OR

    * Member of Group = Alumni ...AND... Contact Type - 'Individual'

    * OR

    * Tagged = VI Faculty ...AND... Contact Type - 'Individual'

    * OR

    * Member of Group = VI Program Alums ...AND... Contact Type - 'Individual'

    * OR

    * Member of Group = Mentors 2009 ...AND... Group Status - "Added" ...AND... Contact Type - 'Individual'

    * OR

    * Member of Group = Paper Invitations ...AND... Group Status - "Added" ...AND... Contact Type - 'Individual'

    * OR

    * Tagged = XXXX XXXXXX Management ...AND... Contact Type - 'Individual'

    * OR

    * Tagged = XXXXXXXXX Executive Advisory Board ...AND... Contact Type - 'Individual'

    * OR

    * Tagged = Donor/Potential Donor ...AND... Contact Type - 'Individual'

    * OR

    * Tagged = VIP ...AND... Contact Type - 'Individual'

Another point is that if I go to Settings for the smart group and then click on "Edit Smart Group Criteria" it says "Invite Email List (smart group) - 8710 Group Members" at the bottom (which is all contacts in the database) and it has no criteria that I can see. But if I view "Members" first and then click "Edit Smart Group Search Criteria for Invite Email List" then I do see the criteria and the number 4125.

Something seems a bit broken here. Any ideas how to fix it?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Complex Smart Group Not Working
August 17, 2009, 04:51:59 am
Any thoughts on this? Do people have experience with Smart Groups with criteria this complex? That's my only idea thus far as to what might be causing the problem.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Complex Smart Group Not Working
August 17, 2009, 05:37:19 am

I assume this is the custom search (include/exclude groups). The smart group complicates the query significantly and hence the behavior

I just checked the code, and that custom search does not use the smart group cache (introduce in 2.1). If you use the cache it simplifies the resultant query (it uses multiple queries to address the issue).

Please file an issue for this. We'll fix it for a future release. If important to you, consider filing a patch.
 
lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Complex Smart Group Not Working
August 18, 2009, 10:37:12 am
Quote from: Donald Lobo on August 17, 2009, 05:37:19 am
Please file an issue for this. 

http://issues.civicrm.org/jira/browse/CRM-4926

Quote from: Donald Lobo on August 17, 2009, 05:37:19 am
If important to you, consider filing a patch.

I will consider this.

Thank you.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Complex Smart Group Not Working

This forum was archived on 2017-11-26.