ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lawrencefinn <lar...@gmail.com>
Subject count from subquery is wrong
Date Tue, 31 Jan 2017 21:10:42 GMT
We like to retrieve the count of possible items to allow pagination but doing
a regular count is slow so we want to limit it to some large number.  I run
the query [1] and it returns 2000, which makes no sense.  I am doing a limit
1000.  What is going on?  It doesn't seem to double every result set, just
those at 1000

[1]
select count(*) from (select 1 one
from "line-items".LineItem li
  join "last-week-reports".Report rr
  on (li.last_week_report_id = rr.id and rr.member_id = 3296  and rr.f_id =
false)
  join "last-week-line-item-pacings".LineItemPacing pacing
  on (li.id = pacing.id)
where li.member_id = 3296
limit 1000)



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/count-from-subquery-is-wrong-tp10344.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message