Sunday, February 19, 2012

Execution plans - SQLCE 3

Does SQLCE 3 cache execution plans? Or even make use of them?

Thanks

Tryst

This quesiton is better suited for the Sql Mobile forum.

I'll move it there.

Thanks.

|||SQL CE 2.0 and SQL Mobile support the concept of "preparing" a SQL command, i.e. compiling its execution path for later reuse. You generally use prepared commands with command parameters that can be named in SQL Mobile.|||Thanks for the replies.

Yeah, I have created a SQL Command object and makes use of command parameters. So, in theory, my application is slighty more efficient because of this?

Tryst|||

In some cases you can see 10x gain from using parameters (usually on bulk inserts). Not only your command is prepared, there's no need to convert data to strings to create SQL statement and to convert these strings back to binary to be used by SQL Mobile engine.

You could run some benchmarks if you’d like to know exactly how much gain you’re getting in your specific case.

|||Hi Iyla, and thanks for the reply.

Do you use specific software for bench-marking? Or do you just put your own code into specific areas of the code you are testing?

Thanks

Tryst|||

I'm using my own code to measure how long it takes to execute one way or another.

No comments:

Post a Comment