This is with 4.5.2-HBase-0.98 and 4.x-HBase-0.98 head, got almost the same numbers with both.
On Wed, May 11, 2016 at 12:19 AM, Naveen Nahata <[email protected]> wrote: > Thanks Mujtaba. > > Could you tell me which version of phoenix are you using ? > > -Naveen Nahata > > On 11 May 2016 at 04:12, Mujtaba Chohan <[email protected]> wrote: > >> Tried the following in Sqlline/Phoenix and HBase shell. Both take ~20ms >> for >> point lookups with local HBase. >> >> hbase(main):015:0> get 'MYTABLE','a' >> COLUMN >> CELL >> >> 0:MYCOL timestamp=1462515518048, >> value=b >> >> 0:_0 timestamp=1462515518048, >> value= >> >> 2 row(s) in 0.0190 seconds >> >> 0: jdbc:phoenix:localhost> select * from mytable where pk1='a'; >> +------+--------+ >> | PK1 | MYCOL | >> +------+--------+ >> | a | b | >> +------+--------+ >> 1 row selected (0.028 seconds) >> >> In your test, are you factoring out initial cost of setting up Phoenix >> connection? If no then see performance of subsequent runs by measuring >> time >> in a loop for executeStatement and iterate over resultSet. >> >> -mujtaba >> >> >> On Tue, May 10, 2016 at 12:55 PM, Naveen Nahata ( SC ) < >> [email protected]> wrote: >> >> > Hi, >> > >> > I am using phoenix 4.5.2-HBase-0.98 to connect HBase. To benchmark >> > phoenix perforance executed select statement on primary key using >> phoenix >> > driver and hbase client. >> > >> > Surprisingly figured out PhoenixDriver is approx. 10~15 times slower >> then >> > hbase client. >> > >> > >> > >> > Addition to this looked explain statement from phoenix, which stats >> query >> > is look up on one key. >> > >> > >> > >> > >> > If query on look up on 1 key why its taking so long ? >> > >> > Code Ref. >> > >> > // Connecting phoenix >> > >> > String sql = "select * from fklogistics.shipment where shipmentId = >> 'WSRR4271782117'"; >> > long startTime = System.nanoTime(); >> > ResultSet rs1 = st.executeQuery(sql); >> > long endTime = System.nanoTime(); >> > long duration = endTime - startTime; >> > System.out.println("Time take by phoenix :" + duration); >> > >> > // Connecting HBase >> > >> > Get get = new Get(row); >> > startTime = System.nanoTime(); >> > Result rs = table1.get(get); >> > endTime = System.nanoTime(); >> > duration = endTime - startTime; >> > System.out.println("Time take by hbase :" + duration); >> > >> > Please suggest why query is so slow ? Also will upgrading phoenix >> driver can help in this ? >> > >> > Thanks & Regards, >> > >> > Naveen Nahata >> > >> > >> > >> > >
