You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "Ruilong Huo (JIRA)" <ji...@apache.org> on 2016/04/01 05:55:25 UTC
[jira] [Closed] (HAWQ-611) Improve performance for query with entry
database involved
[ https://issues.apache.org/jira/browse/HAWQ-611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ruilong Huo closed HAWQ-611.
----------------------------
> Improve performance for query with entry database involved
> ----------------------------------------------------------
>
> Key: HAWQ-611
> URL: https://issues.apache.org/jira/browse/HAWQ-611
> Project: Apache HAWQ
> Issue Type: Bug
> Components: Query Execution, Transaction
> Affects Versions: 2.0.0-beta-incubating
> Reporter: Ruilong Huo
> Assignee: Ruilong Huo
> Fix For: 2.0.0
>
>
> During build query context after QE got plan, it needs to open dispatched catalog using heap_open with locking it with AccessShareLock.
> One stage of the locking is to find its lock holder process among all slices: 1) For QD, lock holder is QD itself; 2) For QE, it is QE itself if itself is writer; otherwise, it is the writer among all slices; 3) For entry database, it should be QD.
> However, lock holder for entry database is assigned to itself other than QD. Thus, it timeout for 5 times with 2 ms for each timeout. This makes query with entry database involved has a performance downgrade.
> {noformat}
> DROP TABLE IF EXISTS some_vectors;
> CREATE TABLE some_vectors (
> id SERIAL,
> x FLOAT8[]
> );
> -- hawq 2.0: 150 ms
> -- hawq 1.3.x: 18 ms
> INSERT INTO some_vectors(x) VALUES
> (ARRAY[1,0,0,0]),
> (ARRAY[0,1,0,0]),
> (ARRAY[0,0,1,0]),
> (ARRAY[0,0,0,2]);
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)