ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anil <anilk...@gmail.com>
Subject Re: Fetching large number of records
Date Fri, 02 Dec 2016 05:59:23 GMT
Hi Val,

I think No. Correct me if i am wrong.

i was looking at following code pieces -

1. JdbcResultSet#next()

try {
                JdbcQueryTask.QueryResult res =
                    loc ? qryTask.call() :
ignite.compute(ignite.cluster().forNodeId(nodeId)).call(qryTask);

                finished = res.isFinished();

                it = res.getRows().iterator();

                return next();
            }

 res.getRows() returns all the results and all are in memory. correct ?

2. JdbcQueryTask#call

List<List<?>> rows = new ArrayList<>();

        for (List<?> row : cursor) {
            List<Object> row0 = new ArrayList<>(row.size());

            for (Object val : row)
                row0.add(JdbcUtils.sqlType(val) ? val : val.toString());

            rows.add(row0);

            if (rows.size() == fetchSize) // If fetchSize is 0 then
unlimited
                break;
        }

all cursor rows are fetched and sent to #1

next() method is a just iterator on available rows. agree ? this is not a
streaming from server to client. Am i wrong ?

Thanks

On 2 December 2016 at 04:11, vkulichenko <valentin.kulichenko@gmail.com>
wrote:

> Anil,
>
> While you iterate through the ResultSet on the client, it will fetch
> results
> from server in pages. Are you looking for something else?
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Fetching-large-number-of-records-tp9267p9342.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message