|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| struct | StdAnalyzeData |
| struct | ScalarItem |
| struct | DimensionInfo |
| struct | MultiSortSupportData |
| struct | SortItem |
| struct | StatsBuildData |
Definition at line 51 of file extended_stats_internal.h.
|
extern |
Definition at line 938 of file extended_stats.c.
References Assert, attnum, AttributeNumberIsValid, bms_next_member(), bms_num_members(), fb(), i, j, MaxAttrNumber, and palloc_array.
|
extern |
Definition at line 983 of file extended_stats.c.
References Assert, attlen, attnum, data, fb(), get_typlen(), i, idx(), items, j, len, MAXALIGN, multi_sort_compare(), nitems, palloc0(), palloc_array, pfree(), PG_DETOAST_DATUM, PointerGetDatum(), qsort_interruptible(), toast_raw_datum_size(), value, values, and WIDTH_THRESHOLD.
Referenced by dependency_degree(), and statext_mcv_build().
|
extern |
Definition at line 924 of file extended_stats.c.
References a, ApplySortComparator(), and b.
Referenced by compare_scalars_simple(), and statext_mcv_serialize().
Definition at line 916 of file extended_stats.c.
References a, arg, b, and compare_datums_simple().
Referenced by statext_mcv_serialize().
Definition at line 2032 of file extended_stats.c.
References arg, Assert, fb(), IsA, linitial, list_length(), and lsecond.
Referenced by mcv_get_match_bitmap(), and statext_is_compatible_clause_internal().
|
extern |
Definition at line 2124 of file mcv.c.
References MCVItem::base_frequency, fb(), MCVItem::frequency, i, MCVList::items, list_make1, mcv_get_match_bitmap(), MCVList::nitems, palloc0_array, pfree(), and root.
Referenced by statext_mcv_clauselist_selectivity().
|
extern |
Definition at line 2046 of file mcv.c.
References MCVItem::base_frequency, fb(), MCVItem::frequency, i, MCVList::items, mcv_get_match_bitmap(), MCVList::nitems, RelOptInfo::relid, root, and statext_mcv_load().
Referenced by statext_mcv_clauselist_selectivity().
|
extern |
Definition at line 2004 of file mcv.c.
References CLAMP_PROBABILITY, and fb().
Referenced by statext_mcv_clauselist_selectivity().
|
extern |
Definition at line 848 of file extended_stats.c.
References CurrentMemoryContext, fb(), oper(), PrepareSortSupportFromOrderingOp(), SortSupportData::ssup_collation, SortSupportData::ssup_cxt, and SortSupportData::ssup_nulls_first.
Referenced by build_mss(), dependency_degree(), and ndistinct_for_combination().
Definition at line 862 of file extended_stats.c.
References a, ApplySortComparator(), arg, b, compare(), fb(), and i.
Referenced by build_distinct_groups(), build_sorted_items(), count_distinct_groups(), ndistinct_for_combination(), and statext_mcv_build().
|
extern |
Definition at line 887 of file extended_stats.c.
References a, ApplySortComparator(), b, and fb().
Referenced by dependency_degree().
|
extern |
Definition at line 896 of file extended_stats.c.
References a, ApplySortComparator(), b, fb(), and start.
Referenced by dependency_degree().
|
extern |
Definition at line 829 of file extended_stats.c.
References Assert, fb(), and palloc0().
Referenced by build_mss(), dependency_degree(), and ndistinct_for_combination().
|
extern |
Definition at line 342 of file dependencies.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, MVDependency::attributes, CurrentMemoryContext, data, MVDependency::degree, dependency_degree(), DependencyGenerator_free(), DependencyGenerator_init(), DependencyGenerator_next(), MVDependencies::deps, fb(), i, MVDependencies::magic, MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), MVDependency::nattributes, MVDependencies::ndeps, palloc0(), palloc0_object, repalloc(), STATS_DEPS_MAGIC, STATS_DEPS_TYPE_BASIC, and MVDependencies::type.
Referenced by BuildRelationExtStatistics().
|
extern |
Definition at line 492 of file dependencies.c.
References Assert, MVDependency::attributes, data, MVDependency::degree, MVDependencies::deps, elog, ERROR, fb(), i, MVDependencies::magic, MVDependency::nattributes, MVDependencies::ndeps, palloc0(), palloc0_object, repalloc(), SizeOfHeader, SizeOfItem, STATS_DEPS_MAGIC, STATS_DEPS_TYPE_BASIC, STATS_MAX_DIMENSIONS, MVDependencies::type, VARDATA_ANY(), VARSIZE_ANY(), and VARSIZE_ANY_EXHDR().
Referenced by extended_statistics_update(), pg_dependencies_out(), and statext_dependencies_load().
|
extern |
Definition at line 586 of file dependencies.c.
References MVDependencies::deps, i, MVDependencies::ndeps, and pfree().
Referenced by extended_statistics_update().
|
extern |
Definition at line 437 of file dependencies.c.
References Assert, MVDependency::attributes, MVDependency::degree, MVDependencies::deps, fb(), i, len, MVDependencies::magic, MVDependency::nattributes, MVDependencies::ndeps, output, palloc0(), SET_VARSIZE(), SizeOfHeader, SizeOfItem, MVDependencies::type, VARDATA(), and VARHDRSZ.
Referenced by build_mvdependencies(), and statext_store().
|
extern |
Definition at line 606 of file dependencies.c.
References attnum, MVDependency::attributes, MVDependencies::deps, ereport, errcode(), errmsg(), fb(), i, j, and MVDependencies::ndeps.
Referenced by extended_statistics_update().
|
extern |
Definition at line 178 of file mcv.c.
References Assert, MCVItem::base_frequency, bsearch_arg(), build_column_frequencies(), build_distinct_groups(), build_mss(), build_sorted_items(), data, fb(), MCVItem::frequency, get_mincount_for_mcv_list(), i, MCVItem::isnull, items, j, multi_sort_compare(), MultiSortSupportData::ndims, nitems, palloc(), palloc0(), palloc0_array, palloc_array, pfree(), MultiSortSupportData::ssup, STATS_MCV_MAGIC, STATS_MCV_TYPE_BASIC, and MCVItem::values.
Referenced by BuildRelationExtStatistics().
Definition at line 994 of file mcv.c.
References Assert, MCVItem::base_frequency, data, elog, ERROR, fb(), fetch_att(), MCVItem::frequency, i, MCVItem::isnull, items, len, MAXALIGN, MinSizeOfMCVList, DimensionInfo::nbytes, DimensionInfo::nbytes_aligned, nitems, DimensionInfo::nvalues, palloc(), palloc0(), palloc_array, pfree(), PG_USED_FOR_ASSERTS_ONLY, PointerGetDatum(), repalloc(), SET_VARSIZE(), SizeOfMCVList, start, STATS_MAX_DIMENSIONS, STATS_MCV_MAGIC, STATS_MCV_TYPE_BASIC, STATS_MCVLIST_MAX_ITEMS, DimensionInfo::typlen, MCVItem::values, VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY().
Referenced by pg_stats_ext_mcvlist_items(), and statext_mcv_load().
Definition at line 2179 of file mcv.c.
References fb(), i, MCVItem::isnull, pfree(), and MCVItem::values.
Referenced by statext_mcv_import().
|
extern |
Definition at line 2204 of file mcv.c.
References MCVItem::base_frequency, elog, ereport, errcode(), errmsg(), ERROR, error(), fb(), fmgr_info(), MCVItem::frequency, GETSTRUCT(), getTypeInputInfo(), HeapTupleIsValid, i, InputFunctionCallSafe(), MCVItem::isnull, items, j, nitems, ObjectIdGetDatum(), palloc0(), palloc0_array, palloc0_object, pfree(), PointerGetDatum(), SearchSysCacheCopy1, statext_mcv_free(), statext_mcv_serialize(), STATS_MCV_MAGIC, STATS_MCV_TYPE_BASIC, TextDatumGetCString, and MCVItem::values.
Referenced by import_mcv().
|
extern |
Definition at line 619 of file mcv.c.
References Assert, VacAttrStats::attrcollid, VacAttrStats::attrtype, bsearch_arg(), compare_datums_simple(), compare_scalars_simple(), CurrentMemoryContext, DatumGetCString(), DatumGetPointer(), fb(), i, ITEM_SIZE, len, lookup_type_cache(), TypeCacheEntry::lt_opr, MAXALIGN, DimensionInfo::nbytes, DimensionInfo::nbytes_aligned, DimensionInfo::nvalues, palloc0(), palloc0_array, pfree(), PG_DETOAST_DATUM, PG_UINT16_MAX, PG_USED_FOR_ASSERTS_ONLY, PointerGetDatum(), PrepareSortSupportFromOrderingOp(), qsort_interruptible(), SET_VARSIZE(), SortSupportData::ssup_collation, SortSupportData::ssup_cxt, SortSupportData::ssup_nulls_first, start, store_att_byval(), DimensionInfo::typbyval, TYPECACHE_LT_OPR, DimensionInfo::typlen, value, values, VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
Referenced by statext_mcv_import(), and statext_store().
|
extern |
Definition at line 85 of file mvdistinct.c.
References Assert, AttributeNumberIsValid, MVNDistinctItem::attributes, data, fb(), generator_free(), generator_init(), generator_next(), MVNDistinct::items, items, j, MVNDistinct::magic, MVNDistinctItem::nattributes, MVNDistinctItem::ndistinct, ndistinct_for_combination(), MVNDistinct::nitems, nitems, num_combinations(), palloc(), palloc_array, STATS_NDISTINCT_MAGIC, STATS_NDISTINCT_TYPE_BASIC, and MVNDistinct::type.
Referenced by BuildRelationExtStatistics().
|
extern |
Definition at line 247 of file mvdistinct.c.
References Assert, MVNDistinctItem::attributes, data, elog, ERROR, fb(), i, MVNDistinct::items, items, MVNDistinct::magic, MAXALIGN, MinSizeOfItems, MVNDistinctItem::nattributes, MVNDistinctItem::ndistinct, MVNDistinct::nitems, palloc(), palloc0(), SizeOfHeader, STATS_MAX_DIMENSIONS, STATS_NDISTINCT_MAGIC, STATS_NDISTINCT_TYPE_BASIC, MVNDistinct::type, VARDATA_ANY(), VARSIZE_ANY(), and VARSIZE_ANY_EXHDR().
Referenced by extended_statistics_update(), pg_ndistinct_out(), and statext_ndistinct_load().
|
extern |
Definition at line 332 of file mvdistinct.c.
References MVNDistinctItem::attributes, i, MVNDistinct::items, MVNDistinct::nitems, and pfree().
Referenced by extended_statistics_update().
|
extern |
Definition at line 176 of file mvdistinct.c.
References Assert, MVNDistinctItem::attributes, fb(), i, MVNDistinct::items, len, MVNDistinct::magic, MVNDistinctItem::nattributes, MVNDistinctItem::ndistinct, MVNDistinct::nitems, output, palloc(), SET_VARSIZE(), SizeOfHeader, SizeOfItem, STATS_NDISTINCT_MAGIC, STATS_NDISTINCT_TYPE_BASIC, MVNDistinct::type, VARDATA(), and VARHDRSZ.
Referenced by build_mvndistinct(), and statext_store().
|
extern |
Definition at line 352 of file mvdistinct.c.
References attnum, MVNDistinctItem::attributes, ereport, errcode(), errmsg(), fb(), i, MVNDistinct::items, j, MVNDistinctItem::nattributes, and MVNDistinct::nitems.
Referenced by extended_statistics_update().