[fdo-users] How to boost ISelect and IUpdate command performance

Romica Dascalescu Romica.Dascalescu at autodesk.com
Tue Nov 30 10:21:09 EST 2010


Try using parameter values...

     FdoPtr<FdoISelect> selectCmd = (FdoISelect*)conn->CreateCommand(FdoCommandType_Select); 
     selectCmd->SetFeatureClassName(L"MyClass");
     FdoPtr<FdoFilter> filter = FdoFilter::Parse(L"ID < :parm1");
     selectCmd->SetFilter(filter);
     FdoPtr<FdoParameterValueCollection>parms = selectCmd->GetParameterValues();
     FdoPtr<FdoInt32Value> intval = FdoInt32Value::Create(30);
     FdoPtr<FdoParameterValue>parm = FdoParameterValue::Create(L"parm1",intval);
     parms->Add(parm);

{// first execute using 30
     FdoPtr<FdoIFeatureReader>reader = selectCmd->Execute();
}
intval->SetInt32(44);
{// secon execute using 44
     FdoPtr<FdoIFeatureReader>reader = selectCmd->Execute();
}

Regards,
Romy.
________________________________________
From: fdo-users-bounces at lists.osgeo.org [fdo-users-bounces at lists.osgeo.org] on behalf of Ray [ray.wu at efacec.com]
Sent: Tuesday, November 30, 2010 9:59 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] How to boost ISelect and IUpdate command performance

I need to use ISelect to do query for hundreds of thousand times. Every time
the filter string is the same but the binding variable changes. See sample
code below. I wonder how the performance can be maximized?
I know in Oracle I can use dynamic sql and binding variable to boost the
performance. Is there similar thing we can do to boost performance here in
FDO?

Dim fdoCmd As ISelect =
fdoConn.CreateCommand(CommandType.CommandType_Select)
Dim fdoReader As OSGeo.FDO.Commands.Feature.IFeatureReader = Nothing
Dim filterString As String = String.Format("( UFID = {0} )", ufid)
fdoCmd.SetFilter(filterString)
fdoCmd.Prepare()
fdoReader = swicSelCmd.Execute()

How about IUpdate command?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-boost-ISelect-and-IUpdate-command-performance-tp5788379p5788379.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users


More information about the fdo-users mailing list