Results 1 to 3 of 3

Thread: Test postresql databbase

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Answers
    4

    Test postresql databbase

    Hi everybody,

    can anyone clarify about how to test db testing, i am using postgresql. What is the procedure to do this test and how to check volume or load capability of db? is there any way to create dummy records(50000) automatically like name, address, age like that how to creat 50,000 records automatically to check the volume or load of the db?


  2. #2
    Banned
    Join Date
    Oct 2007
    Answers
    173

    Re: Test postresql databbase

    Database tests are supported via odbc using the following functions: sqlopen, sqlclose, sqlerror, sqlretrieve, sqlretrievetofile, sqlexecquery, sqlgetschema and sqlrequest. You can carry out cursor type operations by incrementing arrays of returned datasets. All sql queries are supplied as a string. You can execute stored procedures for instance on sql server you could use “exec mystoredprocedure” and as long as that stored procedure is registered on the sql server database then it should execute however you cannot interact as much as you may like by supplying say in/out variables, etc but for most instances it will cover your database test requirements a sample database test could look like this: sub main ' declarations ' dim connection as long dim destination(1 to 50, 1 to 125) as variant dim retcode as long dim query as string dim outputstr as string connection = sqlopen("dsn=sbltest",outputstr,prompt:=3) ' ' execute the query query = "select * from customer" retcode = sqlexecquery(connection,query) ' retrieve the first 50 rows with the first 6 columns of each row into ' the array destination, omit row numbers and put column names in the ' first row of the array retcode = sqlretrieve(connection:=connection,destination:=destination, columnnames:=1,rownumbers:=0,maxrows:=50, maxcolumns:=6,fetchfirst:=0) ' get the next 50 rows of from the result set retcode = sqlretrieve(connection:=connection,destination:=destination,columnnames:=1,rownumbers:=0,maxrows:=50, maxcolumns:=6) ' close the connection retcode = sqlclose(connection) end sub


  3. #3
    Junior Member
    Join Date
    Aug 2006
    Answers
    1

    Re: Test postresql databbase

    You have tools like pgbench available to test the performance for your postgresql database, make sure u change the required parameters to get the best performance after running your tests using pgbench.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact