兰心开源队——openGauss完整评注代码 #42

Open
zpc_gitlink wants to merge 118 commits from zpc_gitlink/openGauss-server:master into master
1 changed files with 15 additions and 0 deletions
Showing only changes of commit 49c1d030a9 - Show all commits

View File

@ -17,6 +17,21 @@
*
* -------------------------------------------------------------------------
*/
/*
In PG database, if you check whether an index contributes to one or more queries,
HypoPG can play a key role. It is an extension of postgresql, which allows you to create
virtual indexes and observe whether the optimizer is used. Therefore, you can provide methods
for which queries need to be optimized and which indexes you want to try. So for the average user,
how to better judge whether indexing is effective or not? Virtual index is a very useful thing, with no
side effects. It is just a virtual index. After establishing a virtual index, you can check the COST estimate
after adding the index through EXPLAIN to judge whether the cost will be reduced. In addition, the hypothetica
l index HypoPG will create is not stored in any directory, but in the connection private memory. Therefore, it
will not inflate any tables, nor will it affect any concurrent connections. Because it is assumed that indexes
don't really exist, HypoPG ensures that they will only be used with a simple EXPLAIN statement (no ANALYZE option).
*/
#include <unistd.h>
#include <math.h>
#include "postgres.h"