summaryrefslogtreecommitdiff
path: root/pg_advise/advise_index.h
blob: c1bb9870e62ebca94e4f1b971c49dfd61ef8862e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

#ifndef ADVISE_INDEX_H
#define ADVISE_INDEX_H

typedef unsigned char bool;
#define true	1
#define false	0

typedef struct {
	char	*table;
	char	*col_ids;	/* space saparated column numbers */
	int		size;		/* in KBs */
	double	benefit;
	bool	used;
} AdvIndexInfo;

typedef AdvIndexInfo** AdvIndexList;

extern long compute_config_size(AdvIndexList index_list, int len);

extern void find_optimal_configuration_greedy(AdvIndexList index_list, int len,
												long size_limit);

extern void find_optimal_configuration_dp(AdvIndexList index_list, int len,
											long size_limit);

#endif /* ADVISE_INDEX_H */