mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Teach planner about the idea that a mergejoin won't necessarily read
both input streams to the end. If one variable's range is much less than the other, an indexscan-based merge can win by not scanning all of the other table. Per example from Reinhard Max.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: lsyscache.h,v 1.39 2001/11/05 17:46:36 momjian Exp $
|
||||
* $Id: lsyscache.h,v 1.40 2002/03/01 04:09:28 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -29,6 +29,8 @@ extern RegProcedure get_opcode(Oid opno);
|
||||
extern char *get_opname(Oid opno);
|
||||
extern bool op_mergejoinable(Oid opno, Oid ltype, Oid rtype,
|
||||
Oid *leftOp, Oid *rightOp);
|
||||
extern void op_mergejoin_crossops(Oid opno, Oid *ltop, Oid *gtop,
|
||||
RegProcedure *ltproc, RegProcedure *gtproc);
|
||||
extern Oid op_hashjoinable(Oid opno, Oid ltype, Oid rtype);
|
||||
extern bool op_iscachable(Oid opno);
|
||||
extern Oid get_commutator(Oid opno);
|
||||
|
Reference in New Issue
Block a user