forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc34605d
committed
Fixup some misusages of bms_num_members()
It's a bit inefficient to test if a Bitmapset is empty by counting all themembers and seeing if that number is zero. It's much better just to usebms_is_empty(). Likewise for checking if there are at least two members,just use bms_membership(), which does not need to do anything more afterfinding two members.Discussion:https://postgr.es/m/CAApHDvpvwm_QjbDOb5xga%2BKmX9XkN9xQavNGm3SvDbVnCYOerQ%40mail.gmail.comReviewed-by: Tomas Vondra1 parentff60394 commitc34605d
File tree
2 files changed
+5
-6
lines changed- src/backend
- optimizer/path
- statistics
2 files changed
+5
-6
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 |
| - | |
168 |
| - | |
| 167 | + | |
169 | 168 |
| |
170 | 169 |
| |
171 | 170 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1246 | 1246 |
| |
1247 | 1247 |
| |
1248 | 1248 |
| |
1249 |
| - | |
| 1249 | + | |
1250 | 1250 |
| |
1251 | 1251 |
| |
1252 | 1252 |
| |
| |||
1273 | 1273 |
| |
1274 | 1274 |
| |
1275 | 1275 |
| |
1276 |
| - | |
| 1276 | + | |
1277 | 1277 |
| |
1278 | 1278 |
| |
1279 | 1279 |
| |
1280 | 1280 |
| |
1281 | 1281 |
| |
1282 | 1282 |
| |
1283 |
| - | |
| 1283 | + | |
1284 | 1284 |
| |
1285 | 1285 |
| |
1286 | 1286 |
| |
1287 |
| - | |
| 1287 | + | |
1288 | 1288 |
| |
1289 | 1289 |
| |
1290 | 1290 |
| |
|
0 commit comments
Comments
(0)