Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> object creation: client versus server
Hi!
I've got to insert lots of spatial objects. They consist of
a bunch of attributes plus two VARRAYs.
Now, I can insert them two ways:
1) insert into ... values (primarykey,sdo_geom(Attrib1...attribn,INFO_ARRAY(...),ORD_ARRAY(...)))
2) usersession.createoraobject("MDSYS.SDO_GEOMETRY")
usersession.createoraobject("MDSYS.SDO_ELEM_INFO_ARRAY"
usersession.createoraobject("MDSYS.SDO_ELEM_ORDINATE_ARRAY"
filling the bunch
and using a bind variable.
Right now, I've got an application that creates the sql string, i.e. method 1.
I'm wondering if method two is faster. On one hand, I can use a prepared
statement, possibly even array binding.
On the other hand, if usersession goes to the database and asks about the structure
of the objects it's supposed to create, it's going to do three selects for
each geometry to insert.
Has anyone tried this and could tell me a hint whether it's worth recoding?
Lots of Greetings and Thanks!
Volker
Received on Mon Dec 12 2005 - 15:18:23 CST