hie Gwyn,
May be this will help - read all the threads
http://www.nabble.com/RE%3A--Contract-for-%22Iterator-IDataProvider.iterator%28int-first%2C-int-count%29%22-tf1395451.html#a11057660
Gwyn wrote:
Hi,
Anyone got any suggestions as to the best way to provide a paging
Hi,
Anyone got any suggestions as to the best way to provide a paging
data view without requiring using size() to actually count the records
in DB?
I've got a site that has a production DB such that
select COUNT(*) from mytable
takes a non-trivial amount of time/cpu to return, whereas to
The most interesting questions is of course: what database? Perhaps
someone here knows how to get the count(*) faster? you might want to
do a select count(primary_key) instead of *.
As an answer to your question: you could use Integer.MAX_VALUE.
Martijn
--
Wicket joins the Apache Software
Gwyn Evans wrote:
Hi,
Anyone got any suggestions as to the best way to provide a paging
data view without requiring using size() to actually count the records
in DB?
I've got a site that has a production DB such that
select COUNT(*) from mytable
takes a non-trivial amount of
Any modern database uses a cost-based optimizer to determine its
query execution plans. This means that at a minimum the database
knows how many rows each table contains. This means that you just
have to find this metadata -- then you can use that in lieu an actual
count(*).
On oracle you
Of course this metadata-level cardinality may be generated daily and
hence may not be current, but for the purposes of paging it's probably
entirely sufficient unless you expect a user to walk through many,
many pages of data.
On 6/29/07, Scott Swank [EMAIL PROTECTED] wrote:
Any modern database
On Friday, June 29, 2007, 12:36:34 PM, Martijn [EMAIL PROTECTED] wrote:
The most interesting questions is of course: what database? Perhaps
someone here knows how to get the count(*) faster? you might want to
do a select count(primary_key) instead of *.
As an answer to your question: you
On Friday, June 29, 2007, 12:32:35 PM, C. [EMAIL PROTECTED] wrote:
Gwyn Evans wrote:
Hi,
Anyone got any suggestions as to the best way to provide a paging
data view without requiring using size() to actually count the records
in DB?
I've got a site that has a production DB such that
There is no performance difference between count(*) and
count(not_nullable_column). Stick with count(*), since it's clearer
what you really want.
On 6/29/07, Gwyn Evans [EMAIL PROTECTED] wrote:
On Friday, June 29, 2007, 12:36:34 PM, Martijn [EMAIL PROTECTED] wrote:
The most interesting
Gwyn Evans wrote:
What I was wondering was if anyone had any suggestions about a table
object that just did 'next'/'prev' paging, rather than working out
Page N of M, although I'll try work out if select count(id) is
faster/less cost than select count(*)
In the past we didn't think there was
10 matches
Mail list logo