[gdal-dev] double delay getting feature count
Chaitanya kumar CH
chaitanya.ch at gmail.com
Wed Oct 14 14:34:09 EDT 2009
Bruce,
The GetFeatureCount function gets the value with an SQL query to the data
server. The bottleneck may be at the connection.
On Wed, Oct 14, 2009 at 9:28 PM, Clay, Bruce <bclay at ball.com> wrote:
> I have tried several different arrangements trying to get the feature
> count from a user selection and I am getting a delay two times for each
> query.
>
>
>
> My current arrangement is
>
>
>
> OGRLayer *queryLayer = dataSource->ExecuteSQL(fullQueryString, NULL,
> "generic");
>
>
>
> if (queryLayer != NULL)
>
> {
>
> queryLayer->ResetReading();
>
> OGRFeature *feature = queryLayer->GetNextFeature();
>
>
>
> int numFeatures = queryLayer->GetFeatureCount();
>
>
>
> . . .Display progress meter then loop reading the features from Oracle
>
>
>
>
>
>
>
>
>
> I have tried putting the call to GetFeatureCount first and there is no
> apparent difference.
>
>
>
> I am reading data from an Oracle database and using GDAL version 1.6.2 on
> Windows XP
>
>
>
> The call to ExecuteSql returns right away but the call to the first
> GetNextFeature and the call to GetFeatureCount both have a long delay
> depending on the size of the dataset.
>
>
>
> I need the feature count to use in a progress popup window to let the user
> know what is happening.
>
>
>
> Is there a way to only pay for the query time once and still get the
> feature count?
>
>
>
>
>
> Bruce
>
> This message and any enclosures are intended only for the addressee. Please
> notify the sender by email if you are not the intended recipient. If you are
> not the intended recipient, you may not use, copy, disclose, or distribute this
> message or its contents or enclosures to any other person and any such actions
> may be unlawful. Ball reserves the right to monitor and review all messages
> and enclosures sent to or from this email address.
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
Best regards,
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091015/60166c98/attachment-0001.html
More information about the gdal-dev
mailing list