PostgreSQL Space Performance test notes based on JMeter

Source: Internet
Author: User
Tags postgresql postgis postgresql version

This is a test that was done a long time ago, recently in the collation of the PostgreSQL data related to the test, so also took it out to share with you.

First explain the so-called PostgreSQL space performance, mainly based on the postgis of spatial data import performance, detailed PostGIS knowledge please Baidu, the following record the entire test process.

Create a space layer in PostgreSQL manually

1. Skip the deployment actions of PostgreSQL, PostGIS, and JMeter (if this step does not skip all steps)

2. Create a database of templates for the PostGIS database, there is topology in the creation of a successful database schema, as shown in:

3. Create a normal table in the database, as shown in:

CREATE TABLE Test1

(

Id Integer,

Name varchar (20)

)

And then add a Geometry field named shape (two-dimensional point \ line \ Polygon) to Test1:

Select addgeometrycolumn (' Public ', ' test1 ', ' shape ', 4326, ' point ', 2)

or Select addgeometrycolumn (' Public ', ' test1 ', ' shape ', 4326, ' LINESTRING ', 2)

or Select addgeometrycolumn (' Public ', ' test1 ', ' shape ', 4326, ' POLYGON ', 2)

where 4326 represents GW84 (space) srid,4610 represents Xian80 's srid,4326 represents CGCS2000 's Srid, related detailed parameters please consult the Spatial_ref_sys table

Create a spatial data inbound test plan in JMeter

1, first download the relevant PostgreSQL related to the JDBC driver file, and copy it to the JMeter installation path under the Lib folder, the download path is as follows:

https://jdbc.postgresql.org/download.html (recommended download and PostgreSQL version of the same driver)

2. After starting JMeter, click Test Plan and add the JDBC-downloaded jar file in the library as shown in:

3. Add "Thread Group" as shown in:

4. Add "JDBC Connection Configuration" below the thread group as shown in:

5. Enter the relevant parameters in the JDBC Connection configuration, as shown in:

Or click on the Help button at the top of the interface to get the relevant method for that interface configuration, as shown in:

6. Add "Loop controller" to the thread group

7. Add "JDBC Request" to the loop controller as shown in:

Note: The value of variable name in the JDBC request must be the same as the variable name in the JDBC Connection configuration

8. Add "View result tree" Under thread group to see if the execution result is successful, as shown in:

9. Add "aggregated report" under Thread group to view information such as execution response time, as shown in:

10. Set the following parameters in the JDBC Request:

11, Save the test plan and run, the results are as follows:

Parametric warehousing

1. Add "CSV Data set Config" to the thread group as shown in:

2, make the parameter file csv, and put in the test solution storage path, the CSV file content is as follows:

Note: Because the "," character exists in the value of the parameter, the entire parameter value should be quoted using double quotation marks, as in the following example:

"Parameter Value"

3. Set the CSV Data set config parameter as follows:

4. Set the following parameters in the JDBC Request:

PostgreSQL Space Performance test notes based on JMeter

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.