You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2016/09/07 02:18:22 UTC

Re: Is SqlQuery efficient than SqlFieldsQuery?

Hi Patrick,

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to user-subscribe@ignite.apache.org and follow simple instructions in
the reply.


wbyeh wrote
> I have used a SqlQuery to instead of a SqlFieldsQuery and it has less
> vibration of execution time measuring from the log.  Originally, I was
> using the SqlFieldsQuery to search the Top key values that matched my
> criteria (also using GroupIndex) and I found it was very quirky from many
> over milli-seconds to hundred micro-seconds for dynamic searches. After I
> replaced it in SqlQuery instead, it is running mostly within 2
> milli-seconds to hundred micro-seconds. 
> 
> Therefore, I want to know "Is SqlQuery efficient than SqlFieldsQuery?"
> 
> String sql = "select bid from AskRecord where (amount <=? and (LIMITWIN
> >=? and LIMITPLACE >=?))"
> 		+ " and (LIVE =? and WIN > 0 and PLACE > 0) LIMIT ?";
> 
> 
> String oql = "(amount <=? and (LIMITWIN >=? and LIMITPLACE >=?))"
> 		+ " and (LIVE =? and WIN > 0 and PLACE > 0) LIMIT ?";
> 
> 
> Thank you!
> 
> -Patrick

Generally there should not be much difference in performance. Do you have a
test that you can share with us?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Is-SqlQuery-efficient-than-SqlFieldsQuery-tp7544p7559.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.