You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "bd2019us (JIRA)" <ji...@apache.org> on 2019/04/02 00:47:00 UTC

[jira] [Updated] (PHOENIX-5224) Iteratively executing the same SQL query will greatly damage the performance

     [ https://issues.apache.org/jira/browse/PHOENIX-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bd2019us updated PHOENIX-5224:
------------------------------
    Description: 
Locations: 

(1) phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexRebuildIncrementDisableCountIT.java:170

(2) phoenix-core/src/it/java/org/apache/phoenix/tx/TxCheckpointIT.java:108

(3) phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java:794,858

(4) phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java:240

(5) phoenix-core/src/it/java/org/apache/phoenix/end2end/DropTableIT.java:35

At these locations, the java.sql.Statement is intensively used in a loop and executing the same SQL query, which will highly damage the performance of database access. In such cases, java.sql.PreparedStatement should be used to enable the database compiling the SQL command ahead of time, which has a much better performance compared with Statement.

  was:
Locations: 

(1) phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexRebuildIncrementDisableCountIT.java:170

(2) phoenix-queryserver/src/it/java/org/apache/phoenix/end2end/HttpParamImpersonationQueryServerIT.java:383

(3) phoenix-core/src/it/java/org/apache/phoenix/tx/TxCheckpointIT.java:108

(4) phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java:794,858

(5) phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java:240

(6) phoenix-core/src/it/java/org/apache/phoenix/end2end/DropTableIT.java:35

(7) phoenix-queryserver/src/it/java/org/apache/phoenix/end2end/SecureQueryServerIT.java:297

At these locations, the java.sql.Statement is intensively used in a loop and executing the same SQL query, which will highly damage the performance of database access. In such cases, java.sql.PreparedStatement should be used to enable the database compiling the SQL command ahead of time, which has a much better performance compared with Statement.


> Iteratively executing the same SQL query will greatly damage the performance
> ----------------------------------------------------------------------------
>
>                 Key: PHOENIX-5224
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5224
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: bd2019us
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Locations: 
> (1) phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexRebuildIncrementDisableCountIT.java:170
> (2) phoenix-core/src/it/java/org/apache/phoenix/tx/TxCheckpointIT.java:108
> (3) phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java:794,858
> (4) phoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertSelectAutoCommitIT.java:240
> (5) phoenix-core/src/it/java/org/apache/phoenix/end2end/DropTableIT.java:35
> At these locations, the java.sql.Statement is intensively used in a loop and executing the same SQL query, which will highly damage the performance of database access. In such cases, java.sql.PreparedStatement should be used to enable the database compiling the SQL command ahead of time, which has a much better performance compared with Statement.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)