Small performance improvement in comparetup_heap.
This commit is contained in:
parent
8cb8da38b8
commit
73dd716285
@ -78,7 +78,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.6 2000/02/18 06:32:30 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.7 2000/03/01 17:14:09 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1632,20 +1632,16 @@ comparetup_heap(Tuplesortstate *state, const void *a, const void *b)
|
|||||||
for (nkey = 0; nkey < state->nKeys; nkey++)
|
for (nkey = 0; nkey < state->nKeys; nkey++)
|
||||||
{
|
{
|
||||||
ScanKey scanKey = state->scanKeys + nkey;
|
ScanKey scanKey = state->scanKeys + nkey;
|
||||||
|
AttrNumber attno = scanKey->sk_attno;
|
||||||
Datum lattr,
|
Datum lattr,
|
||||||
rattr;
|
rattr;
|
||||||
bool isnull1,
|
bool isnull1,
|
||||||
isnull2;
|
isnull2;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
lattr = heap_getattr(ltup,
|
lattr = heap_getattr(ltup, attno, tupDesc, &isnull1);
|
||||||
scanKey->sk_attno,
|
rattr = heap_getattr(rtup, attno, tupDesc, &isnull2);
|
||||||
tupDesc,
|
|
||||||
&isnull1);
|
|
||||||
rattr = heap_getattr(rtup,
|
|
||||||
scanKey->sk_attno,
|
|
||||||
tupDesc,
|
|
||||||
&isnull2);
|
|
||||||
if (isnull1)
|
if (isnull1)
|
||||||
{
|
{
|
||||||
if (!isnull2)
|
if (!isnull2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user