Lines Matching refs:num_mcv
1638 int num_mcv,
1842 int num_mcv = stats->attr->attstattarget; in compute_distinct_stats() local
1848 track_max = 2 * num_mcv; in compute_distinct_stats()
2073 track_cnt <= num_mcv) in compute_distinct_stats()
2076 num_mcv = track_cnt; in compute_distinct_stats()
2083 if (num_mcv > track_cnt) in compute_distinct_stats()
2084 num_mcv = track_cnt; in compute_distinct_stats()
2086 if (num_mcv > 0) in compute_distinct_stats()
2088 mcv_counts = (int *) palloc(num_mcv * sizeof(int)); in compute_distinct_stats()
2089 for (i = 0; i < num_mcv; i++) in compute_distinct_stats()
2092 num_mcv = analyze_mcv_list(mcv_counts, num_mcv, in compute_distinct_stats()
2100 if (num_mcv > 0) in compute_distinct_stats()
2108 mcv_values = (Datum *) palloc(num_mcv * sizeof(Datum)); in compute_distinct_stats()
2109 mcv_freqs = (float4 *) palloc(num_mcv * sizeof(float4)); in compute_distinct_stats()
2110 for (i = 0; i < num_mcv; i++) in compute_distinct_stats()
2123 stats->numnumbers[0] = num_mcv; in compute_distinct_stats()
2125 stats->numvalues[0] = num_mcv; in compute_distinct_stats()
2183 int num_mcv = stats->attr->attstattarget; in compute_scalar_stats() local
2189 track = (ScalarMCVItem *) palloc(num_mcv * sizeof(ScalarMCVItem)); in compute_scalar_stats()
2312 if (track_cnt < num_mcv || in compute_scalar_stats()
2323 if (track_cnt < num_mcv) in compute_scalar_stats()
2438 track_cnt <= num_mcv) in compute_scalar_stats()
2441 num_mcv = track_cnt; in compute_scalar_stats()
2448 if (num_mcv > track_cnt) in compute_scalar_stats()
2449 num_mcv = track_cnt; in compute_scalar_stats()
2451 if (num_mcv > 0) in compute_scalar_stats()
2453 mcv_counts = (int *) palloc(num_mcv * sizeof(int)); in compute_scalar_stats()
2454 for (i = 0; i < num_mcv; i++) in compute_scalar_stats()
2457 num_mcv = analyze_mcv_list(mcv_counts, num_mcv, in compute_scalar_stats()
2465 if (num_mcv > 0) in compute_scalar_stats()
2473 mcv_values = (Datum *) palloc(num_mcv * sizeof(Datum)); in compute_scalar_stats()
2474 mcv_freqs = (float4 *) palloc(num_mcv * sizeof(float4)); in compute_scalar_stats()
2475 for (i = 0; i < num_mcv; i++) in compute_scalar_stats()
2488 stats->numnumbers[slot_idx] = num_mcv; in compute_scalar_stats()
2490 stats->numvalues[slot_idx] = num_mcv; in compute_scalar_stats()
2504 num_hist = ndistinct - num_mcv; in compute_scalar_stats()
2518 qsort((void *) track, num_mcv, in compute_scalar_stats()
2528 if (num_mcv > 0) in compute_scalar_stats()
2540 if (j < num_mcv) in compute_scalar_stats()
2741 int num_mcv, in analyze_mcv_list() argument
2756 return num_mcv; in analyze_mcv_list()
2783 for (i = 0; i < num_mcv - 1; i++) in analyze_mcv_list()
2786 while (num_mcv > 0) in analyze_mcv_list()
2805 otherdistinct = ndistinct_table - (num_mcv - 1); in analyze_mcv_list()
2827 K = N * mcv_counts[num_mcv - 1] / n; in analyze_mcv_list()
2831 if (mcv_counts[num_mcv - 1] > selec * samplerows + 2 * stddev + 0.5) in analyze_mcv_list()
2843 num_mcv--; in analyze_mcv_list()
2844 if (num_mcv == 0) in analyze_mcv_list()
2846 sumcount -= mcv_counts[num_mcv - 1]; in analyze_mcv_list()
2849 return num_mcv; in analyze_mcv_list()