summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/analyze.c6
-rw-r--r--src/backend/commands/tablecmds.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 8536332030..e066c59278 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -67,7 +67,7 @@ typedef struct AnlIndexData
/* Default statistics target (GUC parameter) */
-int default_statistics_target = 10;
+int default_statistics_target = 100;
/* A few variables that don't seem worth passing around as parameters */
static int elevel = -1;
@@ -1531,10 +1531,10 @@ std_typanalyze(VacAttrStats *stats)
* error in bin size f, and error probability gamma, the minimum
* random sample size is
* r = 4 * k * ln(2*n/gamma) / f^2
- * Taking f = 0.5, gamma = 0.01, n = 1 million rows, we obtain
+ * Taking f = 0.5, gamma = 0.01, n = 10^6 rows, we obtain
* r = 305.82 * k
* Note that because of the log function, the dependence on n is
- * quite weak; even at n = 1 billion, a 300*k sample gives <= 0.59
+ * quite weak; even at n = 10^12, a 300*k sample gives <= 0.66
* bin size error with probability 0.99. So there's no real need to
* scale for n, which is a good thing because we don't necessarily
* know it at this point.
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index dcf85637af..8b276ae7fc 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -3942,9 +3942,9 @@ ATExecSetStatistics(Relation rel, const char *colName, Node *newValue)
errmsg("statistics target %d is too low",
newtarget)));
}
- else if (newtarget > 1000)
+ else if (newtarget > 10000)
{
- newtarget = 1000;
+ newtarget = 10000;
ereport(WARNING,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("lowering statistics target to %d",