You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by James Taylor <ja...@apache.org> on 2014/08/29 20:24:54 UTC

Re: Top-N query

You can try a few things:
- salt your table by tacking on a SALT_BUCKETS=n where n is related to
the size of your cluster. Perhaps start with 16.
- lead your primary key constraint with "core desc" if this is your
primary means of accessing this table.
- add a secondary index over "core desc" if this is a common means of
accessing your table.

Thanks,
James

On Thu, Aug 28, 2014 at 10:16 PM, Suvra Dutta <su...@tcs.com> wrote:
> Hi all,
>
> As per the phoenix performance link(
> http://phoenix.apache.org/performance.html) the following query should
> take only 6-7 secs over 10M records.
> select core from t order by core desc limit 10
>
> However, when I run a similar query on a non-rowkey column over only 1M
> records, it is taking around 20 sec.
>
> can you please suggest anything to improve the query  performance?
>
> Note: The number of region-servers is three.
>
>
>
>
>
> Suvra Dutta
> Tata Consultancy Services
> Mailto: suvra.dutta@tcs.com
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty.   IT Services
>                         Business Solutions
>                         Consulting
> ____________________________________________
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>