Fossil SCM

Provide buttons to run ANALYZE with and without a limit on the /repo_stat1 page.

drh 2023-12-31 13:49 trunk
Commit 349fb1fa16e7875cefc4bbdef75d082567e6be006216c8d9c65d82f540ade983
1 file changed +13
+13
--- src/stat.c
+++ src/stat.c
@@ -773,10 +773,15 @@
773773
int bTabular;
774774
login_check_credentials();
775775
if( !g.perm.Admin ){ login_needed(0); return; }
776776
bTabular = PB("tabular");
777777
778
+ if( P("analyze")!=0 ){
779
+ db_multi_exec("ANALYZE");
780
+ }else if( P("analyze200")!=0 ){
781
+ db_multi_exec("PRAGMA analysis_limit=200; ANALYZE;");
782
+ }
778783
style_set_current_feature("stat");
779784
style_header("Repository STAT1 Table");
780785
style_adunit_config(ADUNIT_RIGHT_OK);
781786
style_submenu_element("Stat", "stat");
782787
style_submenu_element("Schema", "repo_schema");
@@ -809,10 +814,18 @@
809814
}else{
810815
@ </pre>
811816
}
812817
db_finalize(&q);
813818
}
819
+ @ <p><form method="POST">
820
+ if( bTabular ){
821
+ @ <input type="hidden" name="tabular" value="1">
822
+ }
823
+ @ <input type="submit" name="analyze" value="Run ANALYZE"><br />
824
+ @ <input type="submit" name="analyze200"\
825
+ @ value="Run ANALYZE with limit=200">
826
+ @ </form>
814827
style_finish_page();
815828
}
816829
817830
/*
818831
** WEBPAGE: repo-tabsize
819832
--- src/stat.c
+++ src/stat.c
@@ -773,10 +773,15 @@
773 int bTabular;
774 login_check_credentials();
775 if( !g.perm.Admin ){ login_needed(0); return; }
776 bTabular = PB("tabular");
777
 
 
 
 
 
778 style_set_current_feature("stat");
779 style_header("Repository STAT1 Table");
780 style_adunit_config(ADUNIT_RIGHT_OK);
781 style_submenu_element("Stat", "stat");
782 style_submenu_element("Schema", "repo_schema");
@@ -809,10 +814,18 @@
809 }else{
810 @ </pre>
811 }
812 db_finalize(&q);
813 }
 
 
 
 
 
 
 
 
814 style_finish_page();
815 }
816
817 /*
818 ** WEBPAGE: repo-tabsize
819
--- src/stat.c
+++ src/stat.c
@@ -773,10 +773,15 @@
773 int bTabular;
774 login_check_credentials();
775 if( !g.perm.Admin ){ login_needed(0); return; }
776 bTabular = PB("tabular");
777
778 if( P("analyze")!=0 ){
779 db_multi_exec("ANALYZE");
780 }else if( P("analyze200")!=0 ){
781 db_multi_exec("PRAGMA analysis_limit=200; ANALYZE;");
782 }
783 style_set_current_feature("stat");
784 style_header("Repository STAT1 Table");
785 style_adunit_config(ADUNIT_RIGHT_OK);
786 style_submenu_element("Stat", "stat");
787 style_submenu_element("Schema", "repo_schema");
@@ -809,10 +814,18 @@
814 }else{
815 @ </pre>
816 }
817 db_finalize(&q);
818 }
819 @ <p><form method="POST">
820 if( bTabular ){
821 @ <input type="hidden" name="tabular" value="1">
822 }
823 @ <input type="submit" name="analyze" value="Run ANALYZE"><br />
824 @ <input type="submit" name="analyze200"\
825 @ value="Run ANALYZE with limit=200">
826 @ </form>
827 style_finish_page();
828 }
829
830 /*
831 ** WEBPAGE: repo-tabsize
832

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button