Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit909ca14

Browse files
committed
Improve sorting speed by pre-extracting the first sort-key column of
each tuple, as per my proposal of several days ago. Also, clean upsort memory management by keeping all working data in a separate memorycontext, and refine the handling of low-memory conditions.
1 parente1f06d8 commit909ca14

File tree

2 files changed

+604
-406
lines changed

2 files changed

+604
-406
lines changed

‎src/backend/executor/nodeSort.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeSort.c,v 1.52 2005/11/23 20:27:57 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeSort.c,v 1.53 2006/02/26 22:58:12 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -225,6 +225,8 @@ ExecEndSort(SortState *node)
225225
* clean out the tuple table
226226
*/
227227
ExecClearTuple(node->ss.ss_ScanTupleSlot);
228+
/* must drop pointer to sort result tuple */
229+
ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
228230

229231
/*
230232
* Release tuplesort resources
@@ -292,6 +294,7 @@ ExecReScanSort(SortState *node, ExprContext *exprCtxt)
292294
if (!node->sort_Done)
293295
return;
294296

297+
/* must drop pointer to sort result tuple */
295298
ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
296299

297300
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp