Project

General

Profile

« Previous | Next » 

Revision 3412

schemas/vegbien.sql: namedplace, plantname: *_unique UNIQUE INDEX: Reordered columns to put rank after parent_id and plantname so that these columns, which are usually input table columns, can be used in a merge join index scan, while rank, which is usually a literal value, can applied as an index filter condition after the merge join

View differences:

schemas/vegbien.sql
4242 4242
-- Name: namedplace_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4243 4243
--
4244 4244

  
4245
CREATE UNIQUE INDEX namedplace_unique ON namedplace USING btree ((COALESCE(parent_id, 2147483647)), rank, placename);
4245
CREATE UNIQUE INDEX namedplace_unique ON namedplace USING btree ((COALESCE(parent_id, 2147483647)), placename, rank);
4246 4246

  
4247 4247

  
4248 4248
--
......
4277 4277
-- Name: plantname_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4278 4278
--
4279 4279

  
4280
CREATE UNIQUE INDEX plantname_unique ON plantname USING btree ((COALESCE(parent_id, 2147483647)), rank, plantname, (COALESCE(scope_id, 2147483647)));
4280
CREATE UNIQUE INDEX plantname_unique ON plantname USING btree ((COALESCE(parent_id, 2147483647)), plantname, rank, (COALESCE(scope_id, 2147483647)));
4281 4281

  
4282 4282

  
4283 4283
--

Also available in: Unified diff