You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Li Gao <ga...@marinsoftware.com> on 2015/12/12 04:46:00 UTC

Fwd: Phoenix table stats query performance issue

Hi Phoenix community,

We are encountering general performance degradation when doing table stats
query over the leading primary key column in a Phoenix table.

The table schema, used query, JMeter results observed over 1-hour window,
and the python script that slowly generate data into the table.

Please advise how we can improve the performance of the query

Thanks,
Li

Re: Phoenix table stats query performance issue

Posted by Li Gao <ga...@marinsoftware.com>.
Per a separate thread with suggestions from James, we modified the queries
to split into separate individual queries and the response time seems
improving.

select id from pk.tests order by id limit 1; -- query for min id
select id from pk.tests order by id desc limit 1; -- query for max id

The latest chart for the 2nd query response time is attached with slow
growing table over 6 hours period.

Thanks a lot to James' suggestion. Just want to share it with the community
in case you encounter the similar situation as us.

Thanks,
Li


On Fri, Dec 11, 2015 at 7:46 PM, Li Gao <ga...@marinsoftware.com> wrote:

> Hi Phoenix community,
>
> We are encountering general performance degradation when doing table stats
> query over the leading primary key column in a Phoenix table.
>
> The table schema, used query, JMeter results observed over 1-hour window,
> and the python script that slowly generate data into the table.
>
> Please advise how we can improve the performance of the query
>
> Thanks,
> Li
>
>

Re: Phoenix table stats query performance issue

Posted by James Taylor <ja...@apache.org>.
Hi Li,
That's not performance degradation. Your query requires a full table scan
to calculate the row count. It's going to get slower as the table grows.
Your new queries will remain fast as the table grows in size.
Thanks,
James


On Fri, Dec 11, 2015 at 7:46 PM, Li Gao <ga...@marinsoftware.com> wrote:

> Hi Phoenix community,
>
> We are encountering general performance degradation when doing table stats
> query over the leading primary key column in a Phoenix table.
>
> The table schema, used query, JMeter results observed over 1-hour window,
> and the python script that slowly generate data into the table.
>
> Please advise how we can improve the performance of the query
>
> Thanks,
> Li
>
>