Skip to content

Commit d3d75af

Browse files
committed
added some utility scripts
1 parent 635b619 commit d3d75af

File tree

5 files changed

+46
-0
lines changed

5 files changed

+46
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ node_modules
44
logs
55
*.log
66
npm-debug.log*
7+
#kyle
8+
downloads/*.csv
9+
.DS_Store
10+
tmp*
711

812
# Runtime data
913
pids

scripts/counts.sql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SELECT schemaname,relname,n_live_tup
2+
FROM pg_stat_user_tables
3+
ORDER BY n_live_tup DESC;
4+
5+
6+
7+
-- schemaname | relname | n_live_tup
8+
-- ------------+---------------+------------
9+
-- public | VeteranWar | 1416946
10+
-- public | VeteranBranch | 1321561
11+
-- public | Veterans | 1311435
12+
-- public | Kins | 1311195
13+
-- public | Burials | 1310093
14+
-- public | VeteranRank | 1309348
15+
-- public | Ranks | 15394
16+
-- public | Branches | 74
17+
--
18+
-- public | Cemeteries | 44
19+
-- public | Wars | 21

scripts/createVAdatabase.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- Database: va
2+
3+
-- DROP DATABASE va;
4+
5+
CREATE DATABASE va
6+
WITH
7+
OWNER = "postgres"
8+
ENCODING = 'UTF8'
9+
LC_COLLATE = 'en_US.UTF-8'
10+
LC_CTYPE = 'en_US.UTF-8'
11+
TABLESPACE = pg_default
12+
CONNECTION LIMIT = -1;

scripts/droptables.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP TABLE "VeteranWar", "VeteranBranch", "Veterans", "Kins", "Burials", "VeteranRank", "Ranks", "Branches","Cemeteries", "Wars";

scripts/empty.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- TRUNCATE "VeteranWar" CASCADE;
2+
-- TRUNCATE "VeteranBranch" CASCADE;
3+
-- TRUNCATE "Veterans" CASCADE;;
4+
-- TRUNCATE "Kins" CASCADE;
5+
-- TRUNCATE "Burials" CASCADE;
6+
-- TRUNCATE "VeteranRank" CASCADE;
7+
-- TRUNCATE "Ranks" CASCADE;
8+
-- TRUNCATE "Branches" CASCADE;
9+
TRUNCATE "Cemeteries" ;
10+
-- TRUNCATE "Wars" CASCADE;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy