Index: openacs-4/packages/acs-kernel/sql/postgresql/site-nodes-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/site-nodes-create.sql,v
diff -u -r1.27 -r1.27.2.1
--- openacs-4/packages/acs-kernel/sql/postgresql/site-nodes-create.sql	23 Apr 2013 15:23:11 -0000	1.27
+++ openacs-4/packages/acs-kernel/sql/postgresql/site-nodes-create.sql	22 Feb 2015 21:56:53 -0000	1.27.2.1
@@ -66,17 +66,16 @@
 );
 
 create index site_nodes_object_id_idx on site_nodes (object_id);
-create index site_nodes_parent_id_idx on site_nodes(parent_id,object_id,node_id);
+create index site_nodes_parent_object_node_id_idx on site_nodes(parent_id, object_id, node_id);
 create index site_nodes_tree_skey_idx on site_nodes (tree_sortkey);
+create index site_nodes_parent_id_idx on site_nodes(parent_id);
 
 
-
--- added
-select define_function_args('site_node_get_tree_sortkey','node_id');
-
 --
 -- procedure site_node_get_tree_sortkey/1
 --
+select define_function_args('site_node_get_tree_sortkey','node_id');
+
 CREATE OR REPLACE FUNCTION site_node_get_tree_sortkey(
    p_node_id integer
 ) RETURNS varbit AS $$
