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

Thomas D'Silva resolved PHOENIX-1040.
-------------------------------------
    Resolution: Fixed

This is handled by setting the UPDATE_CACHE_FREQUENCY property.

> support  query using metadata cache
> -----------------------------------
>
>                 Key: PHOENIX-1040
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1040
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: mengqingyi
>            Priority: Major
>              Labels: PointLookup, metadata
>         Attachments: PHOENIX-1040.PATCH
>
>
> I have use case like : select * from t where ROW = ? (ROW is primary key),so 
> it just a hbase get.
> and it turn out a single query will do two RPCs for metadata, they are all 
> calling to 
> {code}
>     public static ColumnResolver getResolverForQuery(SelectStatement 
> statement, PhoenixConnection connection)
>               throws SQLException {
>       List<TableNode> fromNodes = statement.getFrom();
>         if (fromNodes.size() == 1)
>             return new SingleTableColumnResolver(connection, 
> (NamedTableNode)fromNodes.get(0), true);
> {code}
> as you can see "SingleTableColumnResolver(connection, 
> (NamedTableNode)fromNodes.get(0), true)", the third parameter is hard coded 
> to true, which means it never use cache. for performance, we let the query 
> use metadata cache, our test show 30% improvement on RT in our use case.
> in our patch, we do:
> 1. add an timer based updater at the global cache (the one in 
> ConnectionQueryServices)
> 2. the phoenixconnection doesn't have it's own cache, it has a reference to 
> global cache instead 
> i'm looking forward for your advice, thanks



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

Reply via email to