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

Commite89f14e

Browse files
committed
Refactor index cost estimation functions in view of IndexClause changes.
Get rid of deconstruct_indexquals() in favor of just iterating over theIndexClause list directly. The extra services that that function used toprovide, such as hiding clause commutation and associating the right indexcolumn with each clause, are no longer useful given the new data structure.I'd originally thought that it'd provide a useful amount of abstractionby freeing callers from paying attention to the exact clause type of eachindexqual, but that hope proves to have been vain, because few callers canignore the semantic differences between different clause types. Indeed,removing it results in a net code savings, and probably some cycles shavedby not having to build an extra list-of-structs data structure.Also, export a few formerly-static support functions, with the goalof allowing extension AMs to write functionality equivalent togenericcostestimate() without pointless code duplication.Discussion:https://postgr.es/m/24586.1550106354@sss.pgh.pa.us
1 parentfc6c727 commite89f14e

File tree

3 files changed

+172
-233
lines changed

3 files changed

+172
-233
lines changed

‎contrib/bloom/blcost.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,15 @@ blcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
2727
double*indexPages)
2828
{
2929
IndexOptInfo*index=path->indexinfo;
30-
List*qinfos;
3130
GenericCostscosts;
3231

33-
/* Do preliminary analysis of indexquals */
34-
qinfos=deconstruct_indexquals(path);
35-
3632
MemSet(&costs,0,sizeof(costs));
3733

3834
/* We have to visit all index tuples anyway */
3935
costs.numIndexTuples=index->tuples;
4036

4137
/* Use generic estimate */
42-
genericcostestimate(root,path,loop_count,qinfos,&costs);
38+
genericcostestimate(root,path,loop_count,&costs);
4339

4440
*indexStartupCost=costs.indexStartupCost;
4541
*indexTotalCost=costs.indexTotalCost;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp