Hi,
the first case should be faster.
Please consider also this:
doc = db.newInstance("Class Name");
doc.field("firstName", "Test1 Name", "lastName", "Test2 Name" ,"isEnabled",
true);
Lvc@
On 25 March 2014 12:37, Gaurav Dhiman <[email protected]> wrote:
> Which out of below cases of inserting / updating documents is better
> performing (less time and resource consuming), considering 15 to 20 fields
> in document.
>
> *Case 1:*
> *======*
> doc = db.newInstance("Class Name");
> doc.field("firstName", "Test1 Name");
> doc.field("lastName", "Test2 Name");
> doc.field("isEnabled", true);
> ....
> ....
> -- 20 more fields--
> ....
> ....
> doc.save();
> db.commit();
>
>
> *Case 2*
> *======*
> db.save(docJSONObj);
> db.commit();
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.