mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
More optimization.
This commit is contained in:
parent
d244df95db
commit
4ea3f728e9
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.26 1999/02/11 14:59:02 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.27 1999/02/11 16:09:41 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -194,9 +194,9 @@ better_path(Path *new_path, List *unique_paths, bool *is_new)
|
|||||||
* Replace pathkeys that match exactly, (1,2), (1,2).
|
* Replace pathkeys that match exactly, (1,2), (1,2).
|
||||||
* Replace pathkeys (1,2) with (1,2,3) if the latter is not
|
* Replace pathkeys (1,2) with (1,2,3) if the latter is not
|
||||||
* more expensive and replace unordered path with ordered
|
* more expensive and replace unordered path with ordered
|
||||||
* path if it is not more expensive.
|
* path if it is not more expensive. Favor sorted keys
|
||||||
|
* over unsorted keys in the same way.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* same keys, and new is cheaper, use it */
|
/* same keys, and new is cheaper, use it */
|
||||||
if ((longer_key == 0 && more_sort == 0 &&
|
if ((longer_key == 0 && more_sort == 0 &&
|
||||||
new_path->path_cost < path->path_cost) ||
|
new_path->path_cost < path->path_cost) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user