Index: openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql,v
diff -u -r1.29.2.3 -r1.29.2.4
--- openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql	22 Jul 2022 17:37:25 -0000	1.29.2.3
+++ openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql	1 Dec 2022 16:39:48 -0000	1.29.2.4
@@ -36,6 +36,12 @@
                                               'banned', 'rejected', 'deleted', 'expired'))
 );
 
+--
+-- Create a partial index for a very common case.
+--
+CREATE INDEX membership_rels_rel_id_approved_idx ON membership_rels(rel_id) WHERE member_state = 'approved';
+
+
 create table admin_rels (
         rel_id          integer constraint admin_rels_rel_id_fk
                         references membership_rels (rel_id)
