uuid primary key performance

Questions and answers regarding general SQL and backend databases

uuid primary key performance

Postby rogel » Mon Oct 17, 2011 8:03 am

hi! is there a performance hit using servoy uuid generator?
rogel
 
Posts: 264
Joined: Mon Jul 04, 2011 9:09 am

Re: uuid primary key performance

Postby rgansevles » Mon Oct 17, 2011 8:46 am

none other than the space used is slightly larger (if stored as media it is only 16 bytes).

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: uuid primary key performance

Postby rogel » Fri Nov 11, 2011 12:49 am

rgansevles wrote:none other than the space used is slightly larger (if stored as media it is only 16 bytes).

Rob


Thanks Rob!

We are going to the UUID.

I am getting an exception in the databaseManager.getDataSetByQuery(...)
Code: Select all
"Error during evaluation:Wrapped java.lang.RuntimeException: com.servoy.j2db.dataprocessing.DataException: Can't infer the SQL type to use for an instance of com.servoy.j2db.util.UUID. Use setObject() with an explicit Types value to specify the type to use."


e.g.
Code: Select all
var sql = "SELECT iduser FROM system_user WHERE iduser=?";
var dataSet = databaseManager.getDataSetByQuery(AUTH_SERVER, sql, [userID], -1);

where userID is a UUID object. So I changed userID to userID.toString()

We have sql queries all over the place. Is there a easier solution? Can servoy map it internally? I already changed sequence type to uuid generator and checked UUID flag.
rogel
 
Posts: 264
Joined: Mon Jul 04, 2011 9:09 am

Re: uuid primary key performance

Postby rgansevles » Tue Nov 15, 2011 10:42 am

Rogel,

Servoy does map the uuid to a string or bytes for internal queries.
But we don't parse custom queries so we do not know which column is used in your query.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: uuid primary key performance

Postby rogel » Tue Nov 22, 2011 8:04 am

rgansevles wrote:Rogel,

Servoy does map the uuid to a string or bytes for internal queries.
But we don't parse custom queries so we do not know which column is used in your query.

Rob


I see.

Thanks Rob.
rogel
 
Posts: 264
Joined: Mon Jul 04, 2011 9:09 am


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 30 guests

cron