Re: Adding support for Row Compares to nbtree startikey optimization - Mailing list pgsql-hackers

From Chao Li
Subject Re: Adding support for Row Compares to nbtree startikey optimization
Date
Msg-id 175523985114.994.399192844268418577.pgcf@coridan.postgresql.org
Whole thread Raw
Responses Re: Adding support for Row Compares to nbtree startikey optimization
List pgsql-hackers
I tested the patch. Basically all of my test cases passed. Just a few small comments:

+                               if (subkey->sk_attno > firstchangingattnum) /* >, not >= */
+                                       break;

Can we enhance the comment to something like ">, not >= because firstchangingattnum starting from 1".

+                               /*
+                                * Compare the last tuple's datum for this row compare member
+                                * (unless we already know that lasttup must satisfy qual)
+                                */
+                               if (!lastsatisfied)
+                               {

When subkey->sk_attno <= firstchangingattnum, if first is not satisfied, then last should not be satisfied either, so
wecan skip check last. 

The new status of this patch is: Waiting on Author

pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: Skipping schema changes in publication
Next
From: David Rowley
Date:
Subject: Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options