Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

select count(*) ... where ('1'='1') is slow

$
0
0
Hi,

We are writing our own server-side logic to do fetching with streaming -- we fetch only N rows at a time. We need to do this because our data sets are huge (more than 10 GB of data). If we don't limit to N rows at a time, all the rows will be read into memory and this causes troubles with the server.

The logic is working, but we still have performance issue. Specifically, we noticed that for each fetch, there is an extra query to count the number of rows in the DB table. Something like:

Code:

select count(*) from rs358223955 where ('1'='1')
This query itself is very slow too (e.g. taking about 130 seconds to finish). However, if I tried the same query without the WHERE clause, that is:

Code:

select count(*) from rs358223955
This query is much faster (0.016 seconds).

Is there a way for us to force SmartGWT to not do the row counting, or to do it without the WHERE clause?

By the way, in our case, the operationBinding is non-progressiveLoading (i.e. progressiveLoading=false).



Our environment:

1. SmartClient Version: v10.0p_2015-02-03/PowerEdition Deployment (built 2015-02-03)

2. Browser: (not applicable)

3. Server log: (not applicable)

Viewing all articles
Browse latest Browse all 4756

Trending Articles