agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Tomas Vondra <[email protected]>
Subject: [PATCH 2/4] fix costing in cost_incremental_sort
Date: Tue, 9 Jul 2019 00:13:04 +0200
---
src/backend/optimizer/path/costsize.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 7f820e7351..c6aa17ba67 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -1875,16 +1875,8 @@ cost_incremental_sort(Path *path,
limit_tuples);
/* If we have a LIMIT, adjust the number of groups we'll have to return. */
- if (limit_tuples > 0 && limit_tuples < input_tuples)
- {
- output_tuples = limit_tuples;
- output_groups = floor(output_tuples / group_tuples) + 1;
- }
- else
- {
- output_tuples = input_tuples;
- output_groups = input_groups;
- }
+ output_tuples = input_tuples;
+ output_groups = input_groups;
/*
* Startup cost of incremental sort is the startup cost of its first group
--
2.20.1
--5bdgxkv4n6n2squ7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
filename="0003-fix-explain-in-parallel-mode.patch"
view thread (17+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH 2/4] fix costing in cost_incremental_sort
In-Reply-To: <no-message-id-1881983@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox