home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre1.z / postgre1 / bench / create.sh next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1992-08-27  |  700 b   |  37 lines

  1. #!/bin/sh
  2. # $HEADER:
  3. # wisconsin.sh - populates and runs the wisconsin benchmark on a database
  4. # named "bench".
  5. #
  6.  
  7. if (test ! -z "$POSTGRESHOME")
  8. then
  9.     PGHOME=$POSTGRESHOME
  10. else
  11.     PGHOME=/usr/postgres
  12. fi
  13.  
  14. POSTGRES=$PGHOME/bin/postgres
  15. POSTMASTER=$PGHOME/bin/postmaster
  16. CREATEDB=$PGHOME/bin/createdb.sh
  17. VCONTROL=$PGHOME/bin/vcontrol
  18. MAKE=/bin/make
  19.  
  20. echo ===== creating benchmark database ======
  21.  
  22. $CREATEDB bench
  23.  
  24. echo ===== populating initial classes ======
  25.  
  26. for i in querycreat querycopy querydefineindex queryBprime
  27. do
  28.     echo Running $i....
  29.     $POSTGRES -Q bench < $i > /dev/null
  30. done
  31.  
  32. echo ===== vacuuming bench database ======
  33. echo "vacuum" | $POSTGRES -Q bench > /dev/null
  34.  
  35. echo done 
  36.