Showing posts with label servers. Show all posts
Showing posts with label servers. Show all posts

Friday, March 30, 2012

Performance impact of tracing?

I have set up a trace using sp_trace_create and it works fine for most of my
SQL 2k SP 3 servers. However on one server (which is no different to the
others) it has a huge impact on performance to the point where i can not run
tracing. The only difference between servers is that this particular server
has a database which uses a huge amount of UDF's?
Anyone had a similar problem?
Since UDF's run for every row processed they can cause a lot of trace events
if you are tracing at the statement level. Try tracing only the Batch
Completed, SP Completed and RPC Completed events instead. You can always
filter down once you find offending statements and open up the trace. Also
make sure you are sending the results to a LOCAL disk drive that is not used
by the data or especially the log file.
Andrew J. Kelly SQL MVP
"Malarb" <Malarb@.discussions.microsoft.com> wrote in message
news:1C0D4DF0-D62D-4258-A658-F44EB85B798F@.microsoft.com...
>I have set up a trace using sp_trace_create and it works fine for most of
>my
> SQL 2k SP 3 servers. However on one server (which is no different to the
> others) it has a huge impact on performance to the point where i can not
> run
> tracing. The only difference between servers is that this particular
> server
> has a database which uses a huge amount of UDF's?
> Anyone had a similar problem?

Performance impact of tracing?

I have set up a trace using sp_trace_create and it works fine for most of my
SQL 2k SP 3 servers. However on one server (which is no different to the
others) it has a huge impact on performance to the point where i can not run
tracing. The only difference between servers is that this particular server
has a database which uses a huge amount of UDF's?
Anyone had a similar problem?Since UDF's run for every row processed they can cause a lot of trace events
if you are tracing at the statement level. Try tracing only the Batch
Completed, SP Completed and RPC Completed events instead. You can always
filter down once you find offending statements and open up the trace. Also
make sure you are sending the results to a LOCAL disk drive that is not used
by the data or especially the log file.
Andrew J. Kelly SQL MVP
"Malarb" <Malarb@.discussions.microsoft.com> wrote in message
news:1C0D4DF0-D62D-4258-A658-F44EB85B798F@.microsoft.com...
>I have set up a trace using sp_trace_create and it works fine for most of
>my
> SQL 2k SP 3 servers. However on one server (which is no different to the
> others) it has a huge impact on performance to the point where i can not
> run
> tracing. The only difference between servers is that this particular
> server
> has a database which uses a huge amount of UDF's?
> Anyone had a similar problem?

Performance impact of tracing?

I have set up a trace using sp_trace_create and it works fine for most of my
SQL 2k SP 3 servers. However on one server (which is no different to the
others) it has a huge impact on performance to the point where i can not run
tracing. The only difference between servers is that this particular server
has a database which uses a huge amount of UDF's?
Anyone had a similar problem?Since UDF's run for every row processed they can cause a lot of trace events
if you are tracing at the statement level. Try tracing only the Batch
Completed, SP Completed and RPC Completed events instead. You can always
filter down once you find offending statements and open up the trace. Also
make sure you are sending the results to a LOCAL disk drive that is not used
by the data or especially the log file.
--
Andrew J. Kelly SQL MVP
"Malarb" <Malarb@.discussions.microsoft.com> wrote in message
news:1C0D4DF0-D62D-4258-A658-F44EB85B798F@.microsoft.com...
>I have set up a trace using sp_trace_create and it works fine for most of
>my
> SQL 2k SP 3 servers. However on one server (which is no different to the
> others) it has a huge impact on performance to the point where i can not
> run
> tracing. The only difference between servers is that this particular
> server
> has a database which uses a huge amount of UDF's?
> Anyone had a similar problem?

Performance impact of different approaches to querying for 20,000 rows of data

I have two servers - a web server and a data server. I have a web service on
my web server that receives a request for information on anywhere from 1 to
60,000 products. I'm looking at a couple of different approaches for
querying the database for the product information on the 1 to 60,000
products.
1) Pass the product list into a SQL stored procedure as a single delimited
string and have that SQL stored procedure do a SELECT * FROM Products WHERE
Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not sure of all of the
details of how I'll get from my single delimited string to that SQL query,
but I assume I can do it.
2) Loop through the list of 1 to 60,000 products and issue 1 to 60,000 calls
to a SQL stored procedure that returns data for a single product. My client
that's issuing the requests is multi-threaded and I'm comfortable that I can
set this up so that I'm issuing the 60,000 calls 5-10 or more calls at a
time.
The client that's requesting the 1 to 60,000 products is not very time
sensitive. It's a batch product feed process that runs 1 to 4 times a day.
The database I'm querying also supports a web site that does have real-time
requirements, so I don't want to structure my query in such a way that my
web service is negatively impacting the performance of my web site.
I'm trying to understand the pros and cons of the two approaches and would
appreciate any inputs. Thoughts I have so far:
Option 1 may perform better for the product feed client because it has one
large network transaction instead of 1 to 60,000 small network transactions.
But Option 1 may put a more intense load on the SQL server for a period of
time, potentially negatively impacting the real-time performance of the web
site.
With either solution I probably want to look at ways to ensure that the
request for data for 1 to 60,000 products is done at a lower priority than
real-time requests from the web site.
Any thoughts or suggestions?
Thanks,
ZoeZoe,
Have a look at this link to see how to pass in a delimited list and process
it appropriately. But I would probably create 2 or more stored procedures to
handle the different ranges of product requests so you can get a proper
query plan for each. For instance if you only had one product specified you
can easily do an index seek and get a good plan. But to retrieve 60K
products you may need to do a scan or Merge Join or even Hash Join. Due to
parameter sniffing if the first time the proc was run it had 50K products
you would get a plan for that many rows. But when you call it the next time
even with 1 product you will still get the same plan as before. So I would
have your app decide how may products there will be and call one of 2 or
more (depends on how many different query plans you may encounter) sps so
they each get their own plan. The case where they only lookup a single
product you can use a straight forward query with an =. More than 1 you need
to use dynamic sql or parse it into a table with a UDF.
http://www.sommarskog.se/arrays-in-sql.html
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Zoe Hart" <zoe.hart@.nospam.competitive.com> wrote in message
news:eNn1t%235UIHA.1480@.TK2MSFTNGP06.phx.gbl...
>I have two servers - a web server and a data server. I have a web service
>on my web server that receives a request for information on anywhere from 1
>to 60,000 products. I'm looking at a couple of different approaches for
>querying the database for the product information on the 1 to 60,000
>products.
> 1) Pass the product list into a SQL stored procedure as a single delimited
> string and have that SQL stored procedure do a SELECT * FROM Products
> WHERE Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not sure of all
> of the details of how I'll get from my single delimited string to that SQL
> query, but I assume I can do it.
> 2) Loop through the list of 1 to 60,000 products and issue 1 to 60,000
> calls to a SQL stored procedure that returns data for a single product. My
> client that's issuing the requests is multi-threaded and I'm comfortable
> that I can set this up so that I'm issuing the 60,000 calls 5-10 or more
> calls at a time.
> The client that's requesting the 1 to 60,000 products is not very time
> sensitive. It's a batch product feed process that runs 1 to 4 times a day.
> The database I'm querying also supports a web site that does have
> real-time requirements, so I don't want to structure my query in such a
> way that my web service is negatively impacting the performance of my web
> site.
> I'm trying to understand the pros and cons of the two approaches and would
> appreciate any inputs. Thoughts I have so far:
> Option 1 may perform better for the product feed client because it has one
> large network transaction instead of 1 to 60,000 small network
> transactions. But Option 1 may put a more intense load on the SQL server
> for a period of time, potentially negatively impacting the real-time
> performance of the web site.
> With either solution I probably want to look at ways to ensure that the
> request for data for 1 to 60,000 products is done at a lower priority than
> real-time requests from the web site.
> Any thoughts or suggestions?
> Thanks,
> Zoe
>|||"Zoe Hart" <zoe.hart@.nospam.competitive.com> wrote in message
news:eNn1t%235UIHA.1480@.TK2MSFTNGP06.phx.gbl...
>I have two servers - a web server and a data server. I have a web service
>on my web server that receives a request for information on anywhere from 1
>to 60,000 products. I'm looking at a couple of different approaches for
>querying the database for the product information on the 1 to 60,000
>products.
> 1) Pass the product list into a SQL stored procedure as a single delimited
> string and have that SQL stored procedure do a SELECT * FROM Products
> WHERE Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not sure of all
> of the details of how I'll get from my single delimited string to that SQL
> query, but I assume I can do it.
> 2) Loop through the list of 1 to 60,000 products and issue 1 to 60,000
> calls to a SQL stored procedure that returns data for a single product. My
> client that's issuing the requests is multi-threaded and I'm comfortable
> that I can set this up so that I'm issuing the 60,000 calls 5-10 or more
> calls at a time.
> The client that's requesting the 1 to 60,000 products is not very time
> sensitive. It's a batch product feed process that runs 1 to 4 times a day.
> The database I'm querying also supports a web site that does have
> real-time requirements, so I don't want to structure my query in such a
> way that my web service is negatively impacting the performance of my web
> site.
> I'm trying to understand the pros and cons of the two approaches and would
> appreciate any inputs. Thoughts I have so far:
> Option 1 may perform better for the product feed client because it has one
> large network transaction instead of 1 to 60,000 small network
> transactions. But Option 1 may put a more intense load on the SQL server
> for a period of time, potentially negatively impacting the real-time
> performance of the web site.
> With either solution I probably want to look at ways to ensure that the
> request for data for 1 to 60,000 products is done at a lower priority than
> real-time requests from the web site.
> Any thoughts or suggestions?
> Thanks,
> Zoe
>
Zoe,
Maybe another alternative is to use an XML as a parameter so you can load
easily this XML in a table, add indexes or whatever you need, and do a join
with your product table. I don't recommend option 2 (60000 calls) due to
network overhead and latency. It will be A LOT slower than the one call
alternative.
--
Rubén Garrigós
Solid Quality Mentors|||Zoe Hart (zoe.hart@.nospam.competitive.com) writes:
> 1) Pass the product list into a SQL stored procedure as a single
> delimited string and have that SQL stored procedure do a SELECT * FROM
> Products WHERE Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not
> sure of all of the details of how I'll get from my single delimited
> string to that SQL query, but I assume I can do it.
Whatever, don't do exactly this. The time it would take to compile
that statement is amazing, particularly if you are on SQL 2000.
But there are other alternatives, as I discuss in my article
http://www.sommarskog.se/arrays-in-sql.html.
Andrew made an important point about the need for different plans due
to the number of elements in the list. I think the best approach is to
unpack the list into a temp table, as this will cause a recompile
and the actual join is likely to use the best plan.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||Thanks for all the good input. Our rough plan at this point is to have a
stored procedure that accepts an XML input that contains the 1-n SKUs. That
stored procedure will create a temporary table that with columns for the SKU
and the other data we intend to look up. The stored procedure will write the
1-n SKUs to the temporary table and then use UPDATE FROM to join the
temporary table to one or more tables that contain the data we need and
update the columns in the temporary table. We'll then SELECT * from the
temporary table FOR XML to get our results. We can either go with that
result as is or map it to a format we like better in the code that calls the
stored proc.
Thanks again.
Zoe
"Zoe Hart" <zoe.hart@.nospam.competitive.com> wrote in message
news:eNn1t%235UIHA.1480@.TK2MSFTNGP06.phx.gbl...
>I have two servers - a web server and a data server. I have a web service
>on my web server that receives a request for information on anywhere from 1
>to 60,000 products. I'm looking at a couple of different approaches for
>querying the database for the product information on the 1 to 60,000
>products.
> 1) Pass the product list into a SQL stored procedure as a single delimited
> string and have that SQL stored procedure do a SELECT * FROM Products
> WHERE Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not sure of all
> of the details of how I'll get from my single delimited string to that SQL
> query, but I assume I can do it.
> 2) Loop through the list of 1 to 60,000 products and issue 1 to 60,000
> calls to a SQL stored procedure that returns data for a single product. My
> client that's issuing the requests is multi-threaded and I'm comfortable
> that I can set this up so that I'm issuing the 60,000 calls 5-10 or more
> calls at a time.
> The client that's requesting the 1 to 60,000 products is not very time
> sensitive. It's a batch product feed process that runs 1 to 4 times a day.
> The database I'm querying also supports a web site that does have
> real-time requirements, so I don't want to structure my query in such a
> way that my web service is negatively impacting the performance of my web
> site.
> I'm trying to understand the pros and cons of the two approaches and would
> appreciate any inputs. Thoughts I have so far:
> Option 1 may perform better for the product feed client because it has one
> large network transaction instead of 1 to 60,000 small network
> transactions. But Option 1 may put a more intense load on the SQL server
> for a period of time, potentially negatively impacting the real-time
> performance of the web site.
> With either solution I probably want to look at ways to ensure that the
> request for data for 1 to 60,000 products is done at a lower priority than
> real-time requests from the web site.
> Any thoughts or suggestions?
> Thanks,
> Zoe
>|||Sounds like about the best available approach.
Otherwise, if the query list is really that long, you might upload a
flat file to the server and then import it with an SSIS package.
Note that the numbers, 20k, 60k, are very tiny numbers for data in
terms of modern SQL Server performance, they are just very large
numbers if you try to list them all as part of a SQL command!
Josh
On Tue, 15 Jan 2008 09:52:25 -0500, "Zoe Hart"
<zoe.hart@.nospam.competitive.com> wrote:
>Thanks for all the good input. Our rough plan at this point is to have a
>stored procedure that accepts an XML input that contains the 1-n SKUs. That
>stored procedure will create a temporary table that with columns for the SKU
>and the other data we intend to look up. The stored procedure will write the
>1-n SKUs to the temporary table and then use UPDATE FROM to join the
>temporary table to one or more tables that contain the data we need and
>update the columns in the temporary table. We'll then SELECT * from the
>temporary table FOR XML to get our results. We can either go with that
>result as is or map it to a format we like better in the code that calls the
>stored proc.
>Thanks again.
>Zoe
>"Zoe Hart" <zoe.hart@.nospam.competitive.com> wrote in message
>news:eNn1t%235UIHA.1480@.TK2MSFTNGP06.phx.gbl...
>>I have two servers - a web server and a data server. I have a web service
>>on my web server that receives a request for information on anywhere from 1
>>to 60,000 products. I'm looking at a couple of different approaches for
>>querying the database for the product information on the 1 to 60,000
>>products.
>> 1) Pass the product list into a SQL stored procedure as a single delimited
>> string and have that SQL stored procedure do a SELECT * FROM Products
>> WHERE Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not sure of all
>> of the details of how I'll get from my single delimited string to that SQL
>> query, but I assume I can do it.
>> 2) Loop through the list of 1 to 60,000 products and issue 1 to 60,000
>> calls to a SQL stored procedure that returns data for a single product. My
>> client that's issuing the requests is multi-threaded and I'm comfortable
>> that I can set this up so that I'm issuing the 60,000 calls 5-10 or more
>> calls at a time.
>> The client that's requesting the 1 to 60,000 products is not very time
>> sensitive. It's a batch product feed process that runs 1 to 4 times a day.
>> The database I'm querying also supports a web site that does have
>> real-time requirements, so I don't want to structure my query in such a
>> way that my web service is negatively impacting the performance of my web
>> site.
>> I'm trying to understand the pros and cons of the two approaches and would
>> appreciate any inputs. Thoughts I have so far:
>> Option 1 may perform better for the product feed client because it has one
>> large network transaction instead of 1 to 60,000 small network
>> transactions. But Option 1 may put a more intense load on the SQL server
>> for a period of time, potentially negatively impacting the real-time
>> performance of the web site.
>> With either solution I probably want to look at ways to ensure that the
>> request for data for 1 to 60,000 products is done at a lower priority than
>> real-time requests from the web site.
>> Any thoughts or suggestions?
>> Thanks,
>> Zoe
>

Performance impact of different approaches to querying for 20,000 rows of data

I have two servers - a web server and a data server. I have a web service on
my web server that receives a request for information on anywhere from 1 to
60,000 products. I'm looking at a couple of different approaches for
querying the database for the product information on the 1 to 60,000
products.
1) Pass the product list into a SQL stored procedure as a single delimited
string and have that SQL stored procedure do a SELECT * FROM Products WHERE
Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not sure of all of the
details of how I'll get from my single delimited string to that SQL query,
but I assume I can do it.
2) Loop through the list of 1 to 60,000 products and issue 1 to 60,000 calls
to a SQL stored procedure that returns data for a single product. My client
that's issuing the requests is multi-threaded and I'm comfortable that I can
set this up so that I'm issuing the 60,000 calls 5-10 or more calls at a
time.
The client that's requesting the 1 to 60,000 products is not very time
sensitive. It's a batch product feed process that runs 1 to 4 times a day.
The database I'm querying also supports a web site that does have real-time
requirements, so I don't want to structure my query in such a way that my
web service is negatively impacting the performance of my web site.
I'm trying to understand the pros and cons of the two approaches and would
appreciate any inputs. Thoughts I have so far:
Option 1 may perform better for the product feed client because it has one
large network transaction instead of 1 to 60,000 small network transactions.
But Option 1 may put a more intense load on the SQL server for a period of
time, potentially negatively impacting the real-time performance of the web
site.
With either solution I probably want to look at ways to ensure that the
request for data for 1 to 60,000 products is done at a lower priority than
real-time requests from the web site.
Any thoughts or suggestions?
Thanks,
Zoe
Zoe,
Have a look at this link to see how to pass in a delimited list and process
it appropriately. But I would probably create 2 or more stored procedures to
handle the different ranges of product requests so you can get a proper
query plan for each. For instance if you only had one product specified you
can easily do an index seek and get a good plan. But to retrieve 60K
products you may need to do a scan or Merge Join or even Hash Join. Due to
parameter sniffing if the first time the proc was run it had 50K products
you would get a plan for that many rows. But when you call it the next time
even with 1 product you will still get the same plan as before. So I would
have your app decide how may products there will be and call one of 2 or
more (depends on how many different query plans you may encounter) sps so
they each get their own plan. The case where they only lookup a single
product you can use a straight forward query with an =. More than 1 you need
to use dynamic sql or parse it into a table with a UDF.
http://www.sommarskog.se/arrays-in-sql.html
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Zoe Hart" <zoe.hart@.nospam.competitive.com> wrote in message
news:eNn1t%235UIHA.1480@.TK2MSFTNGP06.phx.gbl...
>I have two servers - a web server and a data server. I have a web service
>on my web server that receives a request for information on anywhere from 1
>to 60,000 products. I'm looking at a couple of different approaches for
>querying the database for the product information on the 1 to 60,000
>products.
> 1) Pass the product list into a SQL stored procedure as a single delimited
> string and have that SQL stored procedure do a SELECT * FROM Products
> WHERE Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not sure of all
> of the details of how I'll get from my single delimited string to that SQL
> query, but I assume I can do it.
> 2) Loop through the list of 1 to 60,000 products and issue 1 to 60,000
> calls to a SQL stored procedure that returns data for a single product. My
> client that's issuing the requests is multi-threaded and I'm comfortable
> that I can set this up so that I'm issuing the 60,000 calls 5-10 or more
> calls at a time.
> The client that's requesting the 1 to 60,000 products is not very time
> sensitive. It's a batch product feed process that runs 1 to 4 times a day.
> The database I'm querying also supports a web site that does have
> real-time requirements, so I don't want to structure my query in such a
> way that my web service is negatively impacting the performance of my web
> site.
> I'm trying to understand the pros and cons of the two approaches and would
> appreciate any inputs. Thoughts I have so far:
> Option 1 may perform better for the product feed client because it has one
> large network transaction instead of 1 to 60,000 small network
> transactions. But Option 1 may put a more intense load on the SQL server
> for a period of time, potentially negatively impacting the real-time
> performance of the web site.
> With either solution I probably want to look at ways to ensure that the
> request for data for 1 to 60,000 products is done at a lower priority than
> real-time requests from the web site.
> Any thoughts or suggestions?
> Thanks,
> Zoe
>
|||Zoe Hart (zoe.hart@.nospam.competitive.com) writes:
> 1) Pass the product list into a SQL stored procedure as a single
> delimited string and have that SQL stored procedure do a SELECT * FROM
> Products WHERE Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not
> sure of all of the details of how I'll get from my single delimited
> string to that SQL query, but I assume I can do it.
Whatever, don't do exactly this. The time it would take to compile
that statement is amazing, particularly if you are on SQL 2000.
But there are other alternatives, as I discuss in my article
http://www.sommarskog.se/arrays-in-sql.html.
Andrew made an important point about the need for different plans due
to the number of elements in the list. I think the best approach is to
unpack the list into a temp table, as this will cause a recompile
and the actual join is likely to use the best plan.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Thanks for all the good input. Our rough plan at this point is to have a
stored procedure that accepts an XML input that contains the 1-n SKUs. That
stored procedure will create a temporary table that with columns for the SKU
and the other data we intend to look up. The stored procedure will write the
1-n SKUs to the temporary table and then use UPDATE FROM to join the
temporary table to one or more tables that contain the data we need and
update the columns in the temporary table. We'll then SELECT * from the
temporary table FOR XML to get our results. We can either go with that
result as is or map it to a format we like better in the code that calls the
stored proc.
Thanks again.
Zoe
"Zoe Hart" <zoe.hart@.nospam.competitive.com> wrote in message
news:eNn1t%235UIHA.1480@.TK2MSFTNGP06.phx.gbl...
>I have two servers - a web server and a data server. I have a web service
>on my web server that receives a request for information on anywhere from 1
>to 60,000 products. I'm looking at a couple of different approaches for
>querying the database for the product information on the 1 to 60,000
>products.
> 1) Pass the product list into a SQL stored procedure as a single delimited
> string and have that SQL stored procedure do a SELECT * FROM Products
> WHERE Sku IN ('sku1', 'sku2', 'sku3',..., 'sku60000'). I'm not sure of all
> of the details of how I'll get from my single delimited string to that SQL
> query, but I assume I can do it.
> 2) Loop through the list of 1 to 60,000 products and issue 1 to 60,000
> calls to a SQL stored procedure that returns data for a single product. My
> client that's issuing the requests is multi-threaded and I'm comfortable
> that I can set this up so that I'm issuing the 60,000 calls 5-10 or more
> calls at a time.
> The client that's requesting the 1 to 60,000 products is not very time
> sensitive. It's a batch product feed process that runs 1 to 4 times a day.
> The database I'm querying also supports a web site that does have
> real-time requirements, so I don't want to structure my query in such a
> way that my web service is negatively impacting the performance of my web
> site.
> I'm trying to understand the pros and cons of the two approaches and would
> appreciate any inputs. Thoughts I have so far:
> Option 1 may perform better for the product feed client because it has one
> large network transaction instead of 1 to 60,000 small network
> transactions. But Option 1 may put a more intense load on the SQL server
> for a period of time, potentially negatively impacting the real-time
> performance of the web site.
> With either solution I probably want to look at ways to ensure that the
> request for data for 1 to 60,000 products is done at a lower priority than
> real-time requests from the web site.
> Any thoughts or suggestions?
> Thanks,
> Zoe
>
|||Sounds like about the best available approach.
Otherwise, if the query list is really that long, you might upload a
flat file to the server and then import it with an SSIS package.
Note that the numbers, 20k, 60k, are very tiny numbers for data in
terms of modern SQL Server performance, they are just very large
numbers if you try to list them all as part of a SQL command!
Josh
On Tue, 15 Jan 2008 09:52:25 -0500, "Zoe Hart"
<zoe.hart@.nospam.competitive.com> wrote:

>Thanks for all the good input. Our rough plan at this point is to have a
>stored procedure that accepts an XML input that contains the 1-n SKUs. That
>stored procedure will create a temporary table that with columns for the SKU
>and the other data we intend to look up. The stored procedure will write the
>1-n SKUs to the temporary table and then use UPDATE FROM to join the
>temporary table to one or more tables that contain the data we need and
>update the columns in the temporary table. We'll then SELECT * from the
>temporary table FOR XML to get our results. We can either go with that
>result as is or map it to a format we like better in the code that calls the
>stored proc.
>Thanks again.
>Zoe
>"Zoe Hart" <zoe.hart@.nospam.competitive.com> wrote in message
>news:eNn1t%235UIHA.1480@.TK2MSFTNGP06.phx.gbl...
>

Performance Hits within EM After Upgrading OS to Windows 2003

We have recently upgraded 4 SQL servers to Windows 2003, running SQL Server
2000. Many people are complaining that Enterprise Manager now takes 4-20
seconds to expand the databases on those servers, where before it was either
instant or 1-2 seconds. Once the intial connection has been made, there are
no further performance issues. Do you know if there is a fix, or have others
experienced this slow performance after the upgrade?
We have compared user desktops' memory, processors, hard drives, etc, and
there is no trend there.
We would appreciate any advice before moving forward w/ our other servers'
upgrades!To answer my own question, in case others have experienced this, there was a
database with the "AutoClose" option checked. This was causing the
performance hit in Enterprise Manager after we upgraded to 2003. For
whatever reason, this did not cause problems on a 2000 OS, but definitely
caused issues on 2003 OS.
Resolution, just went into properties for the database and unchecked it.
This increased performance back to its original state. We now have a script
that checks and ensures database properties are set correctly.
Hope this saves someone else out there the headaches we went through trying
to determine the performance issues after upgrading to Windows 2003.
"JaneDoe" wrote:
> We have recently upgraded 4 SQL servers to Windows 2003, running SQL Server
> 2000. Many people are complaining that Enterprise Manager now takes 4-20
> seconds to expand the databases on those servers, where before it was either
> instant or 1-2 seconds. Once the intial connection has been made, there are
> no further performance issues. Do you know if there is a fix, or have others
> experienced this slow performance after the upgrade?
> We have compared user desktops' memory, processors, hard drives, etc, and
> there is no trend there.
> We would appreciate any advice before moving forward w/ our other servers'
> upgrades!

Performance Hits within EM After Upgrading OS to Windows 2003

We have recently upgraded 4 SQL servers to Windows 2003, running SQL Server
2000. Many people are complaining that Enterprise Manager now takes 4-20
seconds to expand the databases on those servers, where before it was either
instant or 1-2 seconds. Once the intial connection has been made, there are
no further performance issues. Do you know if there is a fix, or have other
s
experienced this slow performance after the upgrade?
We have compared user desktops' memory, processors, hard drives, etc, and
there is no trend there.
We would appreciate any advice before moving forward w/ our other servers'
upgrades!To answer my own question, in case others have experienced this, there was a
database with the "AutoClose" option checked. This was causing the
performance hit in Enterprise Manager after we upgraded to 2003. For
whatever reason, this did not cause problems on a 2000 OS, but definitely
caused issues on 2003 OS.
Resolution, just went into properties for the database and unchecked it.
This increased performance back to its original state. We now have a script
that checks and ensures database properties are set correctly.
Hope this saves someone else out there the headaches we went through trying
to determine the performance issues after upgrading to Windows 2003.
"JaneDoe" wrote:

> We have recently upgraded 4 SQL servers to Windows 2003, running SQL Serve
r
> 2000. Many people are complaining that Enterprise Manager now takes 4-20
> seconds to expand the databases on those servers, where before it was eith
er
> instant or 1-2 seconds. Once the intial connection has been made, there a
re
> no further performance issues. Do you know if there is a fix, or have oth
ers
> experienced this slow performance after the upgrade?
> We have compared user desktops' memory, processors, hard drives, etc, and
> there is no trend there.
> We would appreciate any advice before moving forward w/ our other servers'
> upgrades!sql

Performance Hits within EM After Upgrading OS to Windows 2003

We have recently upgraded 4 SQL servers to Windows 2003, running SQL Server
2000. Many people are complaining that Enterprise Manager now takes 4-20
seconds to expand the databases on those servers, where before it was either
instant or 1-2 seconds. Once the intial connection has been made, there are
no further performance issues. Do you know if there is a fix, or have others
experienced this slow performance after the upgrade?
We have compared user desktops' memory, processors, hard drives, etc, and
there is no trend there.
We would appreciate any advice before moving forward w/ our other servers'
upgrades!
To answer my own question, in case others have experienced this, there was a
database with the "AutoClose" option checked. This was causing the
performance hit in Enterprise Manager after we upgraded to 2003. For
whatever reason, this did not cause problems on a 2000 OS, but definitely
caused issues on 2003 OS.
Resolution, just went into properties for the database and unchecked it.
This increased performance back to its original state. We now have a script
that checks and ensures database properties are set correctly.
Hope this saves someone else out there the headaches we went through trying
to determine the performance issues after upgrading to Windows 2003.
"JaneDoe" wrote:

> We have recently upgraded 4 SQL servers to Windows 2003, running SQL Server
> 2000. Many people are complaining that Enterprise Manager now takes 4-20
> seconds to expand the databases on those servers, where before it was either
> instant or 1-2 seconds. Once the intial connection has been made, there are
> no further performance issues. Do you know if there is a fix, or have others
> experienced this slow performance after the upgrade?
> We have compared user desktops' memory, processors, hard drives, etc, and
> there is no trend there.
> We would appreciate any advice before moving forward w/ our other servers'
> upgrades!

Monday, March 26, 2012

Performance difference

Hello,

i'm running 7 same HW&SW configured servers with the same load with SQL Ex 2005 SP1 installed. I'm executing SP over 200.000 times a day. And here comes the problem, every server got different average response time, the quickest executes the SP in 1 ms, the slowlest in 50 ms, that's 50x slower!

Have you any performance hint, please? Thank you.

Are they containing the same data?

You can check the execution plan and compare where the extra time is spent.

|||Thank you Andreas for your kind help. This is great idea! However i don't know how to reach SP execution plan in application runtime or some log option (not in Management Studio). Have you any suggestion, please?|||

To monitor activities on the server you can use the SQL Profiler.

|||if by chance the dbs are fragmented differently, this will affect performance from machine to machine.|||

There is not SQL Profiler present in Express edition, right?

Can i do some kind of analysis in Express edition, except manual query execution plan, please?

Thank you.

|||

In all version of SQL 2005 (including express) you can get the execution plan for any query that has run, providing it's still in cache.

This query will return the statement text, average reads, avg cpu, avg duration and query plan in xml format.

select SUBSTRING(text, statement_start_offset/2, (CASE WHEN statement_end_offset = -1 THEN LEN(CONVERT(nvarchar(max), text)) * 2 ELSE statement_end_offset END - statement_start_offset)/2),total_physical_reads/execution_count as avg_physical_reads, total_logical_reads/execution_count as avg_logical_reads, total_worker_time/execution_count as avg_cpu_time, total_elapsed_time/execution_count as avg_duration, query_plan from sys.dm_exec_query_stats qs cross apply sys.dm_exec_sql_text(sql_handle) st cross apply sys.dm_exec_query_plan(plan_handle) qp

To get the graphical display of the plan just save the xml out with the extension .sqlplan. Management studio will then open and display the graphical plan.

Run this on all your machines, and then compare the results for the query you are interested in.

|||

YES! This is it. Thank you Jerome for your perfect help.

It's interesting that execution plan in xml differs only in ParameterCompiledValue on fast system there's (0) on slow one there's (1). Do you have any idea what it is, please?

Even more interesting is difference in average reads, cpu and duration. My stored procedure consists of 3 commands: (fast system/slow system)

select reads: 2/2

select cpu: 45/59

select duration: 46/59

insert reads: 4/4

insert cpu: 240/78

insert duration: 257/122

update reads: 2/2

update cpu: 49/52

update duration: 55/118

update reads: 2/2

update cpu: 39/49

update duration: 40/150

I see that there's no difference between reads, BUT! on fast system is duration only slightly longer (eg cpu:45 dur: 46)than CPU, on slow system there're big differences (eg cpu: 78 dur: 122) am i right?

What does this mean, please?

|||can you post the plans and machine specs?|||

Sure, here we go...

Both systems are: MS Windows Server 2003, 1 GB RAM, dual XEONs 3 GHz, HDD Raid 5

Fast system:

<ShowPlanXML xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan" Version="1.0" Build="9.00.2047.00">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementText="&#xD;&#xA;CREATE PROCEDURE Ulo?_Snímek&#xD;&#xA;&#x9;-- definice vstupních parametr?&#xD;&#xA;&#x9;@.ID int,&#xD;&#xA;&#x9;@.TIMESTAMPMARK datetime,&#xD;&#xA;&#x9;@.DBTIME datetime,&#xD;&#xA;&#x9;@.EXCHANGEID int,&#xD;&#xA;&#x9;@.RECPCM smallint,&#xD;&#xA;&#x9;@.DURATION bit,&#xD;&#xA;&#x9;@.OBJECT bit,&#xD;&#xA;&#x9;@.O_NUMBER bit,&#xD;&#xA;&#x9;@.O_IMSI bit,&#xD;&#xA;&#x9;@.O_IMEI bit,&#xD;&#xA;&#x9;@.O_CELL bit,&#xD;&#xA;&#x9;@.PROTOCOLID smallint,&#xD;&#xA;&#x9;@.SMS bit,&#xD;&#xA;&#x9;@.NELZE_ZJISTIT bit,&#xD;&#xA;&#x9;@.PRODLEVA int,&#xD;&#xA;&#x9;@.VS bit&#x9;&#xD;&#xA;&#xD;&#xA;AS&#xD;&#xA;DECLARE&#xD;&#xA;&#x9;-- definice proměnnych&#xD;&#xA;&#x9;@.úst?edna int,&#xD;&#xA;&#x9;@.Trasa int,&#xD;&#xA;&#x9;@.OLD_P_Prodleva int,&#xD;&#xA;&#x9;@.OLD_P_Celkem smallint,&#xD;&#xA;&#x9;@.OLD_P_nelze_zjistit smallint,&#xD;&#xA;&#x9;@.OLD_P_DURATION smallint,&#xD;&#xA;&#x9;@.OLD_P_OBJECT smallint,&#xD;&#xA;&#x9;@.OLD_P_SMS smallint,&#xD;&#xA;&#x9;@.OLD_P_O_NUMBER smallint,&#xD;&#xA;&#x9;@.OLD_P_O_IMSI smallint,&#xD;&#xA;&#x9;@.OLD_P_O_IMEI smallint,&#xD;&#xA;&#x9;@.OLD_P_O_CELL smallint,&#xD;&#xA;&#x9;@.OLD_P_HI1 smallint,&#xD;&#xA;&#x9;@.OLD_P_HI2 smallint,&#xD;&#xA;&#x9;@.OLD_P_HI3 smallint,&#xD;&#xA;&#x9;@.OLD_P_VS smallint,&#xD;&#xA;&#x9;@.HI1 bit,&#xD;&#xA;&#x9;@.HI2 bit,&#xD;&#xA;&#x9;@.HI3 bit,&#xD;&#xA;&#x9;@.OLD_Trasa_P_Celkem smallint&#xD;&#xA;&#x9;&#xD;&#xA;BEGIN&#xD;&#xA; -- volba nevrací po?et zahrnutych ?ádk? jako sou?ást vysledkov mno?iny&#xD;&#xA;&#x9;SET NOCOUNT ON;&#xD;&#xA;&#xD;&#xA;&#x9;-- naplnění HI, dle PROTOCOLID&#xD;&#xA;&#x9;" StatementId="1" StatementCompId="2" StatementType="SET ON/OFF" />
<StmtSimple StatementText="&#x9;SELECT @.HI1 = 0;&#xD;&#xA;&#x9;" StatementId="2" StatementCompId="3" StatementType="ASSIGN" />
<StmtSimple StatementText="&#x9;SELECT @.HI2 = 0;&#xD;&#xA;&#x9;" StatementId="3" StatementCompId="4" StatementType="ASSIGN" />
<StmtSimple StatementText="&#x9;SELECT @.HI3 = 0;&#xD;&#xA;&#xD;&#xA;&#x9;" StatementId="4" StatementCompId="5" StatementType="ASSIGN" />
<StmtCond StatementText="&#x9;IF (@.PROTOCOLID = 1)&#xD;&#xA;&#x9;&#x9;" StatementId="5" StatementCompId="6" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;SELECT @.HI1 = 1;&#xD;&#xA;&#xD;&#xA;&#x9;" StatementId="6" StatementCompId="7" StatementType="ASSIGN" />
</Statements>
</Then>
</StmtCond>
<StmtCond StatementText="&#x9;IF (@.PROTOCOLID = 2)&#xD;&#xA;&#x9;&#x9;" StatementId="7" StatementCompId="9" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;SELECT @.HI2 = 1;&#xD;&#xA;&#xD;&#xA;&#x9;" StatementId="8" StatementCompId="10" StatementType="ASSIGN" />
</Statements>
</Then>
</StmtCond>
<StmtCond StatementText="&#x9;IF (@.PROTOCOLID = 3)&#xD;&#xA;&#x9;&#x9;" StatementId="9" StatementCompId="12" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;SELECT @.HI3 = 1;&#xD;&#xA;&#xD;&#xA;&#x9;-- projekce úst?edny&#xD;&#xA;" StatementId="10" StatementCompId="13" StatementType="ASSIGN" />
</Statements>
</Then>
</StmtCond>
<StmtSimple StatementText="&#x9;SELECT @.úst?edna = CASE&#xD;&#xA;&#x9;&#x9;-- ET 01OS CCI&amp;IRI&#xD;&#xA;&#x9;&#x9;WHEN (@.EXCHANGEID = 330022) THEN 1&#xD;&#xA;&#x9;&#x9;-- ET 02OS CCI&amp;IRI&#xD;&#xA;&#x9;&#x9;WHEN (@.EXCHANGEID = 330023) THEN 2&#xD;&#xA;&#x9;&#x9;-- TM 03OS CCI&#xD;&#xA;&#x9;&#x9;WHEN (@.EXCHANGEID = 7199) THEN 3&#xD;&#xA;&#x9;&#x9;-- ?T 30OS CCI&#xD;&#xA;&#x9;&#x9;WHEN (@.EXCHANGEID = 203) and (@.PROTOCOLID = 3) THEN 4&#xD;&#xA;&#x9;&#x9;-- ?T 30OS IRI&#xD;&#xA;&#x9;&#x9;WHEN (@.EXCHANGEID = 203) and (@.PROTOCOLID &lt; 3) THEN 5&#xD;&#xA;&#x9;&#x9;-- neur?eno&#xD;&#xA;&#x9;&#x9;ELSE 0&#xD;&#xA;&#x9;END&#xD;&#xA;&#xD;&#xA;&#x9;-- projekce trasy&#xD;&#xA;" StatementId="11" StatementCompId="15" StatementType="ASSIGN" />
<StmtSimple StatementText="&#x9;SELECT @.Trasa = 0&#xD;&#xA;&#xD;&#xA;&#x9;-- na?tení starych hodnot, pokud ?ádek existuje&#xD;&#xA;" StatementId="12" StatementCompId="16" StatementType="ASSIGN" />
<StmtSimple StatementText="&#x9;SELECT&#xD;&#xA;&#x9;&#x9;@.OLD_P_Prodleva = P_Prodleva,&#xD;&#xA;&#x9;&#x9;@.OLD_P_Celkem = P_Celkem + 1,&#xD;&#xA;&#x9;&#x9;@.OLD_P_nelze_zjistit = P_nelze_zjistit,&#xD;&#xA;&#x9;&#x9;@.OLD_P_DURATION = P_DURATION,&#xD;&#xA;&#x9;&#x9;@.OLD_P_OBJECT = P_OBJECT,&#xD;&#xA;&#x9;&#x9;@.OLD_P_SMS = P_SMS,&#xD;&#xA;&#x9;&#x9;@.OLD_P_O_NUMBER = P_O_NUMBER,&#xD;&#xA;&#x9;&#x9;@.OLD_P_O_IMSI = P_O_IMSI,&#xD;&#xA;&#x9;&#x9;@.OLD_P_O_IMEI = P_O_IMEI,&#xD;&#xA;&#x9;&#x9;@.OLD_P_O_CELL = P_O_CELL,&#xD;&#xA;&#x9;&#x9;@.OLD_P_HI1 = P_HI1,&#xD;&#xA;&#x9;&#x9;@.OLD_P_HI2 = P_HI2,&#xD;&#xA;&#x9;&#x9;@.OLD_P_HI3 = P_HI3,&#xD;&#xA;&#x9;&#x9;@.OLD_P_VS = P_VS&#xD;&#xA;&#x9;FROM&#xD;&#xA;&#x9;&#x9;Snímky&#xD;&#xA;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;(Datum?as = @.TIMESTAMPMARK) and (úst?edna = @.úst?edna)&#xD;&#xA;&#xD;&#xA;&#x9;-- zji?tění zda ?ádek neexistuje (pak INSERT), ?i nikoliv (pak UPDATE)&#xD;&#xA;" StatementId="13" StatementCompId="17" StatementType="SELECT" StatementSubTreeCost="0.0032832" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="19">
<RelOp NodeId="0" PhysicalOp="Compute Scalar" LogicalOp="Compute Scalar" EstimateRows="1" EstimateIO="0" EstimateCPU="1e-007" AvgRowSize="38" EstimatedTotalSubtreeCost="0.0032832" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
<ColumnReference Column="Expr1003" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,CONVERT_IMPLICIT(int,[IRIX].[dbo].[Snímky].[P_Celkem],0)+(1),0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Arithmetic Operation="ADD">
<ScalarOperator>
<Convert DataType="int" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp NodeId="1" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="38" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
</OutputList>
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Index="[PK__Snímky__0519C6AF]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@.TIMESTAMPMARK]">
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.úst?edna]">
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</ComputeScalar>
</RelOp>
<ParameterList>
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-17 04:23:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
<StmtCond StatementText="&#x9;IF (@.OLD_P_Celkem is null)&#xD;&#xA;" StatementId="14" StatementCompId="18" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;-- ?ádek neexistuje, provádím INSERT na základě vstupních parametr?&#xD;&#xA;&#x9;&#x9;INSERT INTO&#xD;&#xA;&#x9;&#x9;&#x9;Snímky&#xD;&#xA;&#x9;&#x9;&#x9;(&#xD;&#xA;&#x9;&#x9;&#x9;Datum?as,&#xD;&#xA;&#x9;&#x9;&#x9;úst?edna,&#xD;&#xA;&#x9;&#x9;&#x9;P_Prodleva,&#xD;&#xA;&#x9;&#x9;&#x9;P_Celkem,&#xD;&#xA;&#x9;&#x9;&#x9;P_nelze_zjistit,&#xD;&#xA;&#x9;&#x9;&#x9;P_DURATION,&#xD;&#xA;&#x9;&#x9;&#x9;P_OBJECT,&#xD;&#xA;&#x9;&#x9;&#x9;P_SMS,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_NUMBER,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_IMSI,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_IMEI,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_CELL,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI1,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI2,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI3,&#xD;&#xA;&#x9;&#x9;&#x9;P_VS&#xD;&#xA;&#x9;&#x9;&#x9;)&#xD;&#xA;&#x9;&#x9;VALUES&#xD;&#xA;&#x9;&#x9;&#x9;(&#xD;&#xA;&#x9;&#x9;&#x9;@.TIMESTAMPMARK,&#xD;&#xA;&#x9;&#x9;&#x9;@.úst?edna,&#xD;&#xA;&#x9;&#x9;&#x9;@.PRODLEVA,&#xD;&#xA;&#x9;&#x9;&#x9;1,&#xD;&#xA;&#x9;&#x9;&#x9;@.NELZE_ZJISTIT,&#xD;&#xA;&#x9;&#x9;&#x9;@.DURATION,&#xD;&#xA;&#x9;&#x9;&#x9;@.OBJECT,&#xD;&#xA;&#x9;&#x9;&#x9;@.SMS,&#xD;&#xA;&#x9;&#x9;&#x9;@.O_NUMBER,&#xD;&#xA;&#x9;&#x9;&#x9;@.O_IMSI,&#xD;&#xA;&#x9;&#x9;&#x9;@.O_IMEI,&#xD;&#xA;&#x9;&#x9;&#x9;@.O_CELL,&#xD;&#xA;&#x9;&#x9;&#x9;@.HI1,&#xD;&#xA;&#x9;&#x9;&#x9;@.HI2,&#xD;&#xA;&#x9;&#x9;&#x9;@.HI3,&#xD;&#xA;&#x9;&#x9;&#x9;@.VS&#xD;&#xA;&#x9;&#x9;&#x9;)&#xD;&#xA;" StatementId="15" StatementCompId="19" StatementType="INSERT" StatementSubTreeCost="0.0132896" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="35">
<RelOp NodeId="1" PhysicalOp="Assert" LogicalOp="Assert" EstimateRows="1" EstimateIO="0" EstimateCPU="1.8e-007" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132896" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<Assert StartupExpression="0">
<RelOp NodeId="2" PhysicalOp="Nested Loops" LogicalOp="Left Semi Join" EstimateRows="1" EstimateIO="0" EstimateCPU="4.18e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132894" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Column="Expr1021" />
</OutputList>
<NestedLoops Optimized="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1021" />
</DefinedValue>
</DefinedValues>
<OuterReferences>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</OuterReferences>
<ProbeColumn>
<ColumnReference Column="Expr1021" />
</ProbeColumn>
<RelOp NodeId="3" PhysicalOp="Clustered Index Insert" LogicalOp="Insert" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="11" EstimatedTotalSubtreeCost="0.0100022" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</OutputList>
<ScalarInsert>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smalldatetime,[@.TIMESTAMPMARK],0)">
<Convert DataType="smalldatetime" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="(1)">
<Const ConstValue="(1)" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1005" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.NELZE_ZJISTIT],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.NELZE_ZJISTIT" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1006" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.DURATION],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.DURATION" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1007" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.OBJECT],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OBJECT" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1008" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.SMS],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.SMS" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1009" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.O_NUMBER],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_NUMBER" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1010" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.O_IMSI],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_IMSI" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1011" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.O_IMEI],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_IMEI" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1012" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.O_CELL],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_CELL" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1013" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.HI1],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI1" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1014" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.HI2],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI2" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1015" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.HI3],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI3" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1016" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.VS],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.VS" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1017" />
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Index="[PK__Snímky__0519C6AF]" />
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky].[Datum?as] = RaiseIfNull([Expr1003]),[IRIX].[dbo].[Snímky].[úst?edna] = RaiseIfNull([@.úst?edna]),[IRIX].[dbo].[Snímky].[P_Prodleva] = RaiseIfNull([@.PRODLEVA]),[IRIX].[dbo].[Snímky].[P_Celkem] = [Expr1004],[IRIX].[dbo].[Snímky].[P_nelze_zjistit] = RaiseIfNull([Expr1005]),[IRIX].[dbo].[Snímky].[P_DURATION] = RaiseIfNull([Expr1006]),[IRIX].[dbo].[Snímky].[P_OBJECT] = RaiseIfNull([Expr1007]),[IRIX].[dbo].[Snímky].[P_SMS] = RaiseIfNull([Expr1008]),[IRIX].[dbo].[Snímky].[P_O_NUMBER] = RaiseIfNull([Expr1009]),[IRIX].[dbo].[Snímky].[P_O_IMSI] = RaiseIfNull([Expr1010]),[IRIX].[dbo].[Snímky].[P_O_IMEI] = RaiseIfNull([Expr1011]),[IRIX].[dbo].[Snímky].[P_O_CELL] = RaiseIfNull([Expr1012]),[IRIX].[dbo].[Snímky].[P_HI1] = RaiseIfNull([Expr1013]),[IRIX].[dbo].[Snímky].[P_HI2] = RaiseIfNull([Expr1014]),[IRIX].[dbo].[Snímky].[P_HI3] = RaiseIfNull([Expr1015]),[IRIX].[dbo].[Snímky].[P_VS] = RaiseIfNull([Expr1016]),[IRIX].[dbo].[Snímky].[P_RDIS] = [Expr1017]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="Datum?as" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1003" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.PRODLEVA" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1005" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1006" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1007" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1008" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1009" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1010" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1011" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1012" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1013" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1014" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1015" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1016" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_RDIS" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1017" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</ScalarInsert>
</RelOp>
<RelOp NodeId="4" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues />
<Object Database="[IRIX]" Schema="[dbo]" Table="[úst?edny]" Index="[PK__úst?edny__7F60ED59]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[úst?edny]" Column="úst?edna" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky].[úst?edna]">
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="CASE WHEN [Expr1021] IS NULL THEN (0) ELSE NULL END">
<IF>
<Condition>
<ScalarOperator>
<Logical Operation="IS NULL">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1021" />
</Identifier>
</ScalarOperator>
</Logical>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="(0)" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Predicate>
</Assert>
</RelOp>
<ParameterList>
<ColumnReference Column="@.VS" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_CELL" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_IMEI" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_IMSI" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_NUMBER" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.SMS" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.OBJECT" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.DURATION" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.NELZE_ZJISTIT" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.PRODLEVA" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-17 04:23:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Then>
<Else>
<Statements />
</Else>
</StmtCond>
<StmtSimple StatementText="&#x9;END&#xD;&#xA;&#x9;ELSE&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;-- ?ádek existuje, provádím UPDATE na základě starych dat a vstupních parametr?&#xD;&#xA;&#x9;&#x9;UPDATE&#xD;&#xA;&#x9;&#x9;&#x9;Snímky&#xD;&#xA;&#x9;&#x9;SET&#xD;&#xA;&#x9;&#x9;&#x9;P_Prodleva = @.OLD_P_Prodleva + @.PRODLEVA,&#xD;&#xA;&#x9;&#x9;&#x9;P_Celkem = @.OLD_P_Celkem,&#xD;&#xA;&#x9;&#x9;&#x9;P_nelze_zjistit = @.OLD_P_nelze_zjistit + @.NELZE_ZJISTIT,&#xD;&#xA;&#x9;&#x9;&#x9;P_DURATION = @.OLD_P_DURATION + @.DURATION,&#xD;&#xA;&#x9;&#x9;&#x9;P_OBJECT = @.OLD_P_OBJECT + @.OBJECT,&#xD;&#xA;&#x9;&#x9;&#x9;P_SMS = @.OLD_P_SMS + @.SMS,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_NUMBER = @.OLD_P_O_NUMBER + @.O_NUMBER,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_IMSI = @.OLD_P_O_IMSI + @.O_IMSI,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_IMEI = @.OLD_P_O_IMEI + @.O_IMEI,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_CELL = @.OLD_P_O_CELL + @.O_CELL,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI1 = @.OLD_P_HI1 + @.HI1,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI2 = @.OLD_P_HI2 + @.HI2,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI3 = @.OLD_P_HI3 + @.HI3,&#xD;&#xA;&#x9;&#x9;&#x9;P_VS = @.OLD_P_VS + @.VS&#xD;&#xA;&#x9;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;&#x9;(Datum?as = @.TIMESTAMPMARK) and (úst?edna = @.úst?edna)&#x9;&#x9;&#xD;&#xA;" StatementId="16" StatementCompId="22" StatementType="UPDATE" StatementSubTreeCost="0.0132842" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="40">
<RelOp NodeId="0" PhysicalOp="Clustered Index Update" LogicalOp="Update" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132842" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<SimpleUpdate>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="[@.OLD_P_Prodleva]+[@.PRODLEVA]">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_Prodleva" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.PRODLEVA" />
</Identifier>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="[@.OLD_P_nelze_zjistit]+CONVERT_IMPLICIT(smallint,[@.NELZE_ZJISTIT],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_nelze_zjistit" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.NELZE_ZJISTIT" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1005" />
<ScalarOperator ScalarString="[@.OLD_P_DURATION]+CONVERT_IMPLICIT(smallint,[@.DURATION],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_DURATION" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.DURATION" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1006" />
<ScalarOperator ScalarString="[@.OLD_P_OBJECT]+CONVERT_IMPLICIT(smallint,[@.OBJECT],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_OBJECT" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OBJECT" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1007" />
<ScalarOperator ScalarString="[@.OLD_P_SMS]+CONVERT_IMPLICIT(smallint,[@.SMS],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_SMS" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.SMS" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1008" />
<ScalarOperator ScalarString="[@.OLD_P_O_NUMBER]+CONVERT_IMPLICIT(smallint,[@.O_NUMBER],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_O_NUMBER" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_NUMBER" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1009" />
<ScalarOperator ScalarString="[@.OLD_P_O_IMSI]+CONVERT_IMPLICIT(smallint,[@.O_IMSI],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_O_IMSI" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_IMSI" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1010" />
<ScalarOperator ScalarString="[@.OLD_P_O_IMEI]+CONVERT_IMPLICIT(smallint,[@.O_IMEI],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_O_IMEI" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_IMEI" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1011" />
<ScalarOperator ScalarString="[@.OLD_P_O_CELL]+CONVERT_IMPLICIT(smallint,[@.O_CELL],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_O_CELL" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_CELL" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1012" />
<ScalarOperator ScalarString="[@.OLD_P_HI1]+CONVERT_IMPLICIT(smallint,[@.HI1],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_HI1" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI1" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1013" />
<ScalarOperator ScalarString="[@.OLD_P_HI2]+CONVERT_IMPLICIT(smallint,[@.HI2],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_HI2" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI2" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1014" />
<ScalarOperator ScalarString="[@.OLD_P_HI3]+CONVERT_IMPLICIT(smallint,[@.HI3],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_HI3" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI3" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1015" />
<ScalarOperator ScalarString="[@.OLD_P_VS]+CONVERT_IMPLICIT(smallint,[@.VS],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_VS" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.VS" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Index="[PK__Snímky__0519C6AF]" />
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@.TIMESTAMPMARK]">
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.úst?edna]">
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky].[P_Prodleva] = RaiseIfNull([Expr1003]),[IRIX].[dbo].[Snímky].[P_Celkem] = RaiseIfNull([@.OLD_P_Celkem]),[IRIX].[dbo].[Snímky].[P_nelze_zjistit] = RaiseIfNull([Expr1004]),[IRIX].[dbo].[Snímky].[P_DURATION] = RaiseIfNull([Expr1005]),[IRIX].[dbo].[Snímky].[P_OBJECT] = RaiseIfNull([Expr1006]),[IRIX].[dbo].[Snímky].[P_SMS] = RaiseIfNull([Expr1007]),[IRIX].[dbo].[Snímky].[P_O_NUMBER] = RaiseIfNull([Expr1008]),[IRIX].[dbo].[Snímky].[P_O_IMSI] = RaiseIfNull([Expr1009]),[IRIX].[dbo].[Snímky].[P_O_IMEI] = RaiseIfNull([Expr1010]),[IRIX].[dbo].[Snímky].[P_O_CELL] = RaiseIfNull([Expr1011]),[IRIX].[dbo].[Snímky].[P_HI1] = RaiseIfNull([Expr1012]),[IRIX].[dbo].[Snímky].[P_HI2] = RaiseIfNull([Expr1013]),[IRIX].[dbo].[Snímky].[P_HI3] = RaiseIfNull([Expr1014]),[IRIX].[dbo].[Snímky].[P_VS] = RaiseIfNull([Expr1015])">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1003" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_Celkem" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1005" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1006" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1007" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1008" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1009" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1010" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1011" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1012" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1013" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1014" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1015" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</SimpleUpdate>
</RelOp>
<ParameterList>
<ColumnReference Column="@.VS" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_CELL" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_IMEI" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_IMSI" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_NUMBER" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.SMS" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.OBJECT" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.DURATION" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.NELZE_ZJISTIT" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.PRODLEVA" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-17 04:23:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
<StmtCond StatementText="&#x9;END&#xD;&#xA;&#xD;&#xA;&#x9;-- pokud byla ztoto?něna trasa&#xD;&#xA;&#x9;IF (@.Trasa &lt;&gt; 0)&#xD;&#xA;" StatementId="17" StatementCompId="24" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;-- na?tení starych hodnot, pokud ?ádek existuje&#xD;&#xA;&#x9;&#x9;SELECT&#xD;&#xA;&#x9;&#x9;&#x9;@.OLD_Trasa_P_Celkem = P_Celkem + 1&#xD;&#xA;&#x9;&#x9;FROM&#xD;&#xA;&#x9;&#x9;&#x9;Snímky_Tras&#xD;&#xA;&#x9;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;&#x9;(Datum?as = @.TIMESTAMPMARK) and (úst?edna = @.úst?edna) and (Trasa = @.Trasa)&#xD;&#xA; &#xD;&#xA;&#x9;&#x9;-- zji?tění zda ?ádek neexistuje (pak INSERT), ?i nikoliv (pak UPDATE)&#xD;&#xA;&#x9;" StatementId="18" StatementCompId="25" StatementType="SELECT" StatementSubTreeCost="0.0032832" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="8">
<RelOp NodeId="0" PhysicalOp="Compute Scalar" LogicalOp="Compute Scalar" EstimateRows="1" EstimateIO="0" EstimateCPU="1e-007" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032832" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Column="Expr1003" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,CONVERT_IMPLICIT(int,[IRIX].[dbo].[Snímky_Tras].[P_Celkem],0)+(1),0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Arithmetic Operation="ADD">
<ScalarOperator>
<Convert DataType="int" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp NodeId="1" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
</OutputList>
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Index="[PK__Snímky_Tras__1A14E395]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@.TIMESTAMPMARK]">
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.úst?edna]">
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.Trasa]">
<Identifier>
<ColumnReference Column="@.Trasa" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</ComputeScalar>
</RelOp>
<ParameterList>
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-17 04:23:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
<StmtCond StatementText="&#x9;IF (@.OLD_Trasa_P_Celkem is null)&#xD;&#xA;&#x9;" StatementId="19" StatementCompId="26" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;&#x9;-- ?ádek neexistuje, provádím INSERT na základě vstupních parametr?&#xD;&#xA;&#x9;&#x9;&#x9;INSERT INTO&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Snímky_Tras&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Datum?as,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;úst?edna,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Trasa,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;P_Celkem&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;)&#xD;&#xA;&#x9;&#x9;&#x9;VALUES&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;@.TIMESTAMPMARK,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;@.úst?edna,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;@.Trasa,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;1&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;)&#xD;&#xA;&#x9;" StatementId="20" StatementCompId="27" StatementType="INSERT" StatementSubTreeCost="0.0165769" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="19">
<RelOp NodeId="1" PhysicalOp="Assert" LogicalOp="Assert" EstimateRows="1" EstimateIO="0" EstimateCPU="1.8e-007" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0165769" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<Assert StartupExpression="0">
<RelOp NodeId="2" PhysicalOp="Nested Loops" LogicalOp="Left Semi Join" EstimateRows="1" EstimateIO="0" EstimateCPU="4.18e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0165767" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Column="Expr1011" />
<ColumnReference Column="Expr1012" />
</OutputList>
<NestedLoops Optimized="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1012" />
</DefinedValue>
</DefinedValues>
<OuterReferences>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</OuterReferences>
<ProbeColumn>
<ColumnReference Column="Expr1012" />
</ProbeColumn>
<RelOp NodeId="3" PhysicalOp="Nested Loops" LogicalOp="Left Semi Join" EstimateRows="1" EstimateIO="0" EstimateCPU="4.18e-006" AvgRowSize="12" EstimatedTotalSubtreeCost="0.0132894" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
<ColumnReference Column="Expr1011" />
</OutputList>
<NestedLoops Optimized="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1011" />
</DefinedValue>
</DefinedValues>
<OuterReferences>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
</OuterReferences>
<ProbeColumn>
<ColumnReference Column="Expr1011" />
</ProbeColumn>
<RelOp NodeId="4" PhysicalOp="Clustered Index Insert" LogicalOp="Insert" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="19" EstimatedTotalSubtreeCost="0.0100022" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</OutputList>
<ScalarInsert>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smalldatetime,[@.TIMESTAMPMARK],0)">
<Convert DataType="smalldatetime" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="(1)">
<Const ConstValue="(1)" />
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Index="[PK__Snímky_Tras__1A14E395]" />
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[Datum?as] = RaiseIfNull([Expr1003]),[IRIX].[dbo].[Snímky_Tras].[úst?edna] = RaiseIfNull([@.úst?edna]),[IRIX].[dbo].[Snímky_Tras].[Trasa] = RaiseIfNull([@.Trasa]),[IRIX].[dbo].[Snímky_Tras].[P_Celkem] = [Expr1004]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1003" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.Trasa" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</ScalarInsert>
</RelOp>
<RelOp NodeId="5" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues />
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Index="[PK__Snímky__0519C6AF]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[Datum?as]">
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[úst?edna]">
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp NodeId="6" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues />
<Object Database="[IRIX]" Schema="[dbo]" Table="[Trasy]" Index="[PK__Trasy__15502E78]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Trasy]" Column="Trasa" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[Trasa]">
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="CASE WHEN [Expr1011] IS NULL THEN (0) ELSE CASE WHEN [Expr1012] IS NULL THEN (1) ELSE NULL END END">
<IF>
<Condition>
<ScalarOperator>
<Logical Operation="IS NULL">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1011" />
</Identifier>
</ScalarOperator>
</Logical>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="(0)" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<IF>
<Condition>
<ScalarOperator>
<Logical Operation="IS NULL">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1012" />
</Identifier>
</ScalarOperator>
</Logical>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Predicate>
</Assert>
</RelOp>
<ParameterList>
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-17 04:23:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Then>
<Else>
<Statements />
</Else>
</StmtCond>
<StmtSimple StatementText="&#x9;END&#xD;&#xA;&#x9;&#x9;ELSE&#xD;&#xA;&#x9;&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;&#x9;-- ?ádek existuje, provádím UPDATE&#xD;&#xA;&#x9;&#x9;&#x9;UPDATE&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Snímky_Tras&#xD;&#xA;&#x9;&#x9;&#x9;SET&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;P_Celkem = @.OLD_Trasa_P_Celkem&#xD;&#xA;&#x9;&#x9;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(Datum?as = @.TIMESTAMPMARK) and (úst?edna = @.úst?edna) and (Trasa = @.Trasa)&#xD;&#xA;&#x9;" StatementId="21" StatementCompId="30" StatementType="UPDATE" StatementSubTreeCost="0.0132841" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="8">
<RelOp NodeId="0" PhysicalOp="Clustered Index Update" LogicalOp="Update" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132841" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<SimpleUpdate>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Index="[PK__Snímky_Tras__1A14E395]" />
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@.TIMESTAMPMARK]">
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.úst?edna]">
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.Trasa]">
<Identifier>
<ColumnReference Column="@.Trasa" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[P_Celkem] = RaiseIfNull([@.OLD_Trasa_P_Celkem])">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_Trasa_P_Celkem" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</SimpleUpdate>
</RelOp>
<ParameterList>
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-17 04:23:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Then>
</StmtCond>
<StmtSimple StatementText="&#x9;END&#xD;&#xA;&#x9;END&#xD;&#xA;&#xD;&#xA;&#x9;-- aktualizace IRI(ID)&#xD;&#xA;&#x9;UPDATE&#xD;&#xA;&#x9;&#x9;Sherman&#xD;&#xA;&#x9;SET&#xD;&#xA;&#x9;&#x9;Sh_ID = @.ID,&#xD;&#xA;&#x9;&#x9;DBTIME = @.DBTIME,&#xD;&#xA;&#x9;&#x9;Aktualizováno = GETDATE()&#xD;&#xA;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;ID = 0;&#xD;" StatementId="22" StatementCompId="33" StatementType="UPDATE" StatementSubTreeCost="0.0132842" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="8">
<RelOp NodeId="0" PhysicalOp="Clustered Index Update" LogicalOp="Update" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132842" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<SimpleUpdate>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="ConstExpr1010">
<ScalarOperator ScalarString="getdate()">
<Intrinsic FunctionName="getdate" />
</ScalarOperator>
</ColumnReference>
<ScalarOperator ScalarString="getdate()">
<Identifier>
<ColumnReference Column="ConstExpr1010">
<ScalarOperator>
<Intrinsic FunctionName="getdate" />
</ScalarOperator>
</ColumnReference>
</Identifier>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Index="[PK__Sherman__182C9B23]" />
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Column="ID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Sherman].[Sh_ID] = RaiseIfNull([@.ID]),[IRIX].[dbo].[Sherman].[DBTIME] = RaiseIfNull([@.DBTIME]),[IRIX].[dbo].[Sherman].[Aktualizováno] = RaiseIfNull(getdate())">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Column="Sh_ID" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.ID" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Column="DBTIME" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.DBTIME" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Column="Aktualizováno" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="ConstExpr1010">
<ScalarOperator>
<Intrinsic FunctionName="getdate" />
</ScalarOperator>
</ColumnReference>
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</SimpleUpdate>
</RelOp>
<ParameterList>
<ColumnReference Column="@.DBTIME" ParameterCompiledValue="'2006-06-17 04:23:08.000'" />
<ColumnReference Column="@.ID" ParameterCompiledValue="(38869807)" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
</BatchSequence>
</ShowPlanXML>

Slow system:

<ShowPlanXML xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan" Version="1.0" Build="9.00.2047.00">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementText="&#xD;&#xA;CREATE PROCEDURE Ulo?_Snímek&#xD;&#xA;&#x9;-- definice vstupních parametr?&#xD;&#xA;&#x9;@.ID int,&#xD;&#xA;&#x9;@.TIMESTAMPMARK datetime,&#xD;&#xA;&#x9;@.DBTIME datetime,&#xD;&#xA;&#x9;@.EXCHANGEID int,&#xD;&#xA;&#x9;@.RECPCM smallint,&#xD;&#xA;&#x9;@.DURATION bit,&#xD;&#xA;&#x9;@.OBJECT bit,&#xD;&#xA;&#x9;@.O_NUMBER bit,&#xD;&#xA;&#x9;@.O_IMSI bit,&#xD;&#xA;&#x9;@.O_IMEI bit,&#xD;&#xA;&#x9;@.O_CELL bit,&#xD;&#xA;&#x9;@.PROTOCOLID smallint,&#xD;&#xA;&#x9;@.SMS bit,&#xD;&#xA;&#x9;@.NELZE_ZJISTIT bit,&#xD;&#xA;&#x9;@.PRODLEVA int,&#xD;&#xA;&#x9;@.VS bit&#x9;&#xD;&#xA;&#xD;&#xA;AS&#xD;&#xA;DECLARE&#xD;&#xA;&#x9;-- definice proměnnych&#xD;&#xA;&#x9;@.úst?edna int,&#xD;&#xA;&#x9;@.Trasa int,&#xD;&#xA;&#x9;@.OLD_P_Prodleva int,&#xD;&#xA;&#x9;@.OLD_P_Celkem smallint,&#xD;&#xA;&#x9;@.OLD_P_nelze_zjistit smallint,&#xD;&#xA;&#x9;@.OLD_P_DURATION smallint,&#xD;&#xA;&#x9;@.OLD_P_OBJECT smallint,&#xD;&#xA;&#x9;@.OLD_P_SMS smallint,&#xD;&#xA;&#x9;@.OLD_P_O_NUMBER smallint,&#xD;&#xA;&#x9;@.OLD_P_O_IMSI smallint,&#xD;&#xA;&#x9;@.OLD_P_O_IMEI smallint,&#xD;&#xA;&#x9;@.OLD_P_O_CELL smallint,&#xD;&#xA;&#x9;@.OLD_P_HI1 smallint,&#xD;&#xA;&#x9;@.OLD_P_HI2 smallint,&#xD;&#xA;&#x9;@.OLD_P_HI3 smallint,&#xD;&#xA;&#x9;@.OLD_P_VS smallint,&#xD;&#xA;&#x9;@.HI1 bit,&#xD;&#xA;&#x9;@.HI2 bit,&#xD;&#xA;&#x9;@.HI3 bit,&#xD;&#xA;&#x9;@.OLD_Trasa_P_Celkem smallint&#xD;&#xA;&#x9;&#xD;&#xA;BEGIN&#xD;&#xA; -- volba nevrací po?et zahrnutych ?ádk? jako sou?ást vysledkov mno?iny&#xD;&#xA;&#x9;SET NOCOUNT ON;&#xD;&#xA;&#xD;&#xA;&#x9;-- naplnění HI, dle PROTOCOLID&#xD;&#xA;&#x9;" StatementId="1" StatementCompId="2" StatementType="SET ON/OFF" />
<StmtSimple StatementText="&#x9;SELECT @.HI1 = 0;&#xD;&#xA;&#x9;" StatementId="2" StatementCompId="3" StatementType="ASSIGN" />
<StmtSimple StatementText="&#x9;SELECT @.HI2 = 0;&#xD;&#xA;&#x9;" StatementId="3" StatementCompId="4" StatementType="ASSIGN" />
<StmtSimple StatementText="&#x9;SELECT @.HI3 = 0;&#xD;&#xA;&#xD;&#xA;&#x9;" StatementId="4" StatementCompId="5" StatementType="ASSIGN" />
<StmtCond StatementText="&#x9;IF (@.PROTOCOLID = 1)&#xD;&#xA;&#x9;&#x9;" StatementId="5" StatementCompId="6" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;SELECT @.HI1 = 1;&#xD;&#xA;&#xD;&#xA;&#x9;" StatementId="6" StatementCompId="7" StatementType="ASSIGN" />
</Statements>
</Then>
</StmtCond>
<StmtCond StatementText="&#x9;IF (@.PROTOCOLID = 2)&#xD;&#xA;&#x9;&#x9;" StatementId="7" StatementCompId="9" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;SELECT @.HI2 = 1;&#xD;&#xA;&#xD;&#xA;&#x9;" StatementId="8" StatementCompId="10" StatementType="ASSIGN" />
</Statements>
</Then>
</StmtCond>
<StmtCond StatementText="&#x9;IF (@.PROTOCOLID = 3)&#xD;&#xA;&#x9;&#x9;" StatementId="9" StatementCompId="12" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;SELECT @.HI3 = 1;&#xD;&#xA;&#xD;&#xA;&#x9;-- projekce úst?edny&#xD;&#xA;" StatementId="10" StatementCompId="13" StatementType="ASSIGN" />
</Statements>
</Then>
</StmtCond>
<StmtSimple StatementText="&#x9;SELECT @.úst?edna = CASE&#xD;&#xA;&#x9;&#x9;-- ET 01UL CCI&amp;IRI&#xD;&#xA;&#x9;&#x9;WHEN (@.EXCHANGEID = 330003) THEN 39&#xD;&#xA;&#x9;&#x9;-- ET 02UL CCI&amp;IRI&#xD;&#xA;&#x9;&#x9;WHEN (@.EXCHANGEID = 330013) THEN 40&#xD;&#xA;&#x9;&#x9;-- TM 10UL CCI&#xD;&#xA;&#x9;&#x9;WHEN (@.EXCHANGEID = 3899) THEN 41&#xD;&#xA;&#x9;&#x9;-- neur?eno&#xD;&#xA;&#x9;&#x9;ELSE 0&#xD;&#xA;&#x9;END&#xD;&#xA;&#xD;&#xA;&#x9;-- projekce trasy&#xD;&#xA;" StatementId="11" StatementCompId="15" StatementType="ASSIGN" />
<StmtSimple StatementText="&#x9;SELECT @.Trasa = 0&#xD;&#xA;&#xD;&#xA;&#x9;-- na?tení starych hodnot, pokud ?ádek existuje&#xD;&#xA;" StatementId="12" StatementCompId="16" StatementType="ASSIGN" />
<StmtSimple StatementText="&#x9;SELECT&#xD;&#xA;&#x9;&#x9;@.OLD_P_Prodleva = P_Prodleva,&#xD;&#xA;&#x9;&#x9;@.OLD_P_Celkem = P_Celkem + 1,&#xD;&#xA;&#x9;&#x9;@.OLD_P_nelze_zjistit = P_nelze_zjistit,&#xD;&#xA;&#x9;&#x9;@.OLD_P_DURATION = P_DURATION,&#xD;&#xA;&#x9;&#x9;@.OLD_P_OBJECT = P_OBJECT,&#xD;&#xA;&#x9;&#x9;@.OLD_P_SMS = P_SMS,&#xD;&#xA;&#x9;&#x9;@.OLD_P_O_NUMBER = P_O_NUMBER,&#xD;&#xA;&#x9;&#x9;@.OLD_P_O_IMSI = P_O_IMSI,&#xD;&#xA;&#x9;&#x9;@.OLD_P_O_IMEI = P_O_IMEI,&#xD;&#xA;&#x9;&#x9;@.OLD_P_O_CELL = P_O_CELL,&#xD;&#xA;&#x9;&#x9;@.OLD_P_HI1 = P_HI1,&#xD;&#xA;&#x9;&#x9;@.OLD_P_HI2 = P_HI2,&#xD;&#xA;&#x9;&#x9;@.OLD_P_HI3 = P_HI3,&#xD;&#xA;&#x9;&#x9;@.OLD_P_VS = P_VS&#xD;&#xA;&#x9;FROM&#xD;&#xA;&#x9;&#x9;Snímky&#xD;&#xA;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;(Datum?as = @.TIMESTAMPMARK) and (úst?edna = @.úst?edna)&#xD;&#xA;&#xD;&#xA;&#x9;-- zji?tění zda ?ádek neexistuje (pak INSERT), ?i nikoliv (pak UPDATE)&#xD;&#xA;" StatementId="13" StatementCompId="17" StatementType="SELECT" StatementSubTreeCost="0.0032832" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="19">
<RelOp NodeId="0" PhysicalOp="Compute Scalar" LogicalOp="Compute Scalar" EstimateRows="1" EstimateIO="0" EstimateCPU="1e-007" AvgRowSize="38" EstimatedTotalSubtreeCost="0.0032832" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
<ColumnReference Column="Expr1003" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,CONVERT_IMPLICIT(int,[IRIX].[dbo].[Snímky].[P_Celkem],0)+(1),0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Arithmetic Operation="ADD">
<ScalarOperator>
<Convert DataType="int" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp NodeId="1" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="38" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
</OutputList>
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Index="[PK__Snímky__0519C6AF]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@.TIMESTAMPMARK]">
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.úst?edna]">
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</ComputeScalar>
</RelOp>
<ParameterList>
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-22 08:28:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
<StmtCond StatementText="&#x9;IF (@.OLD_P_Celkem is null)&#xD;&#xA;" StatementId="14" StatementCompId="18" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;-- ?ádek neexistuje, provádím INSERT na základě vstupních parametr?&#xD;&#xA;&#x9;&#x9;INSERT INTO&#xD;&#xA;&#x9;&#x9;&#x9;Snímky&#xD;&#xA;&#x9;&#x9;&#x9;(&#xD;&#xA;&#x9;&#x9;&#x9;Datum?as,&#xD;&#xA;&#x9;&#x9;&#x9;úst?edna,&#xD;&#xA;&#x9;&#x9;&#x9;P_Prodleva,&#xD;&#xA;&#x9;&#x9;&#x9;P_Celkem,&#xD;&#xA;&#x9;&#x9;&#x9;P_nelze_zjistit,&#xD;&#xA;&#x9;&#x9;&#x9;P_DURATION,&#xD;&#xA;&#x9;&#x9;&#x9;P_OBJECT,&#xD;&#xA;&#x9;&#x9;&#x9;P_SMS,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_NUMBER,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_IMSI,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_IMEI,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_CELL,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI1,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI2,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI3,&#xD;&#xA;&#x9;&#x9;&#x9;P_VS&#xD;&#xA;&#x9;&#x9;&#x9;)&#xD;&#xA;&#x9;&#x9;VALUES&#xD;&#xA;&#x9;&#x9;&#x9;(&#xD;&#xA;&#x9;&#x9;&#x9;@.TIMESTAMPMARK,&#xD;&#xA;&#x9;&#x9;&#x9;@.úst?edna,&#xD;&#xA;&#x9;&#x9;&#x9;@.PRODLEVA,&#xD;&#xA;&#x9;&#x9;&#x9;1,&#xD;&#xA;&#x9;&#x9;&#x9;@.NELZE_ZJISTIT,&#xD;&#xA;&#x9;&#x9;&#x9;@.DURATION,&#xD;&#xA;&#x9;&#x9;&#x9;@.OBJECT,&#xD;&#xA;&#x9;&#x9;&#x9;@.SMS,&#xD;&#xA;&#x9;&#x9;&#x9;@.O_NUMBER,&#xD;&#xA;&#x9;&#x9;&#x9;@.O_IMSI,&#xD;&#xA;&#x9;&#x9;&#x9;@.O_IMEI,&#xD;&#xA;&#x9;&#x9;&#x9;@.O_CELL,&#xD;&#xA;&#x9;&#x9;&#x9;@.HI1,&#xD;&#xA;&#x9;&#x9;&#x9;@.HI2,&#xD;&#xA;&#x9;&#x9;&#x9;@.HI3,&#xD;&#xA;&#x9;&#x9;&#x9;@.VS&#xD;&#xA;&#x9;&#x9;&#x9;)&#xD;&#xA;" StatementId="15" StatementCompId="19" StatementType="INSERT" StatementSubTreeCost="0.0132896" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="35">
<RelOp NodeId="1" PhysicalOp="Assert" LogicalOp="Assert" EstimateRows="1" EstimateIO="0" EstimateCPU="1.8e-007" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132896" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<Assert StartupExpression="0">
<RelOp NodeId="2" PhysicalOp="Nested Loops" LogicalOp="Left Semi Join" EstimateRows="1" EstimateIO="0" EstimateCPU="4.18e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132894" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Column="Expr1021" />
</OutputList>
<NestedLoops Optimized="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1021" />
</DefinedValue>
</DefinedValues>
<OuterReferences>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</OuterReferences>
<ProbeColumn>
<ColumnReference Column="Expr1021" />
</ProbeColumn>
<RelOp NodeId="3" PhysicalOp="Clustered Index Insert" LogicalOp="Insert" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="11" EstimatedTotalSubtreeCost="0.0100022" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</OutputList>
<ScalarInsert>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smalldatetime,[@.TIMESTAMPMARK],0)">
<Convert DataType="smalldatetime" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="(1)">
<Const ConstValue="(1)" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1005" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.NELZE_ZJISTIT],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.NELZE_ZJISTIT" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1006" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.DURATION],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.DURATION" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1007" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.OBJECT],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OBJECT" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1008" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.SMS],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.SMS" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1009" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.O_NUMBER],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_NUMBER" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1010" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.O_IMSI],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_IMSI" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1011" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.O_IMEI],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_IMEI" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1012" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.O_CELL],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_CELL" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1013" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.HI1],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI1" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1014" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.HI2],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI2" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1015" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.HI3],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI3" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1016" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,[@.VS],0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.VS" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1017" />
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Index="[PK__Snímky__0519C6AF]" />
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky].[Datum?as] = RaiseIfNull([Expr1003]),[IRIX].[dbo].[Snímky].[úst?edna] = RaiseIfNull([@.úst?edna]),[IRIX].[dbo].[Snímky].[P_Prodleva] = RaiseIfNull([@.PRODLEVA]),[IRIX].[dbo].[Snímky].[P_Celkem] = [Expr1004],[IRIX].[dbo].[Snímky].[P_nelze_zjistit] = RaiseIfNull([Expr1005]),[IRIX].[dbo].[Snímky].[P_DURATION] = RaiseIfNull([Expr1006]),[IRIX].[dbo].[Snímky].[P_OBJECT] = RaiseIfNull([Expr1007]),[IRIX].[dbo].[Snímky].[P_SMS] = RaiseIfNull([Expr1008]),[IRIX].[dbo].[Snímky].[P_O_NUMBER] = RaiseIfNull([Expr1009]),[IRIX].[dbo].[Snímky].[P_O_IMSI] = RaiseIfNull([Expr1010]),[IRIX].[dbo].[Snímky].[P_O_IMEI] = RaiseIfNull([Expr1011]),[IRIX].[dbo].[Snímky].[P_O_CELL] = RaiseIfNull([Expr1012]),[IRIX].[dbo].[Snímky].[P_HI1] = RaiseIfNull([Expr1013]),[IRIX].[dbo].[Snímky].[P_HI2] = RaiseIfNull([Expr1014]),[IRIX].[dbo].[Snímky].[P_HI3] = RaiseIfNull([Expr1015]),[IRIX].[dbo].[Snímky].[P_VS] = RaiseIfNull([Expr1016]),[IRIX].[dbo].[Snímky].[P_RDIS] = [Expr1017]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="Datum?as" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1003" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.PRODLEVA" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1005" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1006" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1007" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1008" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1009" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1010" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1011" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1012" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1013" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1014" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1015" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1016" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_RDIS" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1017" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</ScalarInsert>
</RelOp>
<RelOp NodeId="4" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues />
<Object Database="[IRIX]" Schema="[dbo]" Table="[úst?edny]" Index="[PK__úst?edny__7F60ED59]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[úst?edny]" Column="úst?edna" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky].[úst?edna]">
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="CASE WHEN [Expr1021] IS NULL THEN (0) ELSE NULL END">
<IF>
<Condition>
<ScalarOperator>
<Logical Operation="IS NULL">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1021" />
</Identifier>
</ScalarOperator>
</Logical>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="(0)" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Predicate>
</Assert>
</RelOp>
<ParameterList>
<ColumnReference Column="@.VS" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_CELL" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.O_IMEI" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.O_IMSI" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.O_NUMBER" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.SMS" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.OBJECT" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.DURATION" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.NELZE_ZJISTIT" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.PRODLEVA" ParameterCompiledValue="(120)" />
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-22 08:28:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Then>
<Else>
<Statements />
</Else>
</StmtCond>
<StmtSimple StatementText="&#x9;END&#xD;&#xA;&#x9;ELSE&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;-- ?ádek existuje, provádím UPDATE na základě starych dat a vstupních parametr?&#xD;&#xA;&#x9;&#x9;UPDATE&#xD;&#xA;&#x9;&#x9;&#x9;Snímky&#xD;&#xA;&#x9;&#x9;SET&#xD;&#xA;&#x9;&#x9;&#x9;P_Prodleva = @.OLD_P_Prodleva + @.PRODLEVA,&#xD;&#xA;&#x9;&#x9;&#x9;P_Celkem = @.OLD_P_Celkem,&#xD;&#xA;&#x9;&#x9;&#x9;P_nelze_zjistit = @.OLD_P_nelze_zjistit + @.NELZE_ZJISTIT,&#xD;&#xA;&#x9;&#x9;&#x9;P_DURATION = @.OLD_P_DURATION + @.DURATION,&#xD;&#xA;&#x9;&#x9;&#x9;P_OBJECT = @.OLD_P_OBJECT + @.OBJECT,&#xD;&#xA;&#x9;&#x9;&#x9;P_SMS = @.OLD_P_SMS + @.SMS,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_NUMBER = @.OLD_P_O_NUMBER + @.O_NUMBER,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_IMSI = @.OLD_P_O_IMSI + @.O_IMSI,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_IMEI = @.OLD_P_O_IMEI + @.O_IMEI,&#xD;&#xA;&#x9;&#x9;&#x9;P_O_CELL = @.OLD_P_O_CELL + @.O_CELL,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI1 = @.OLD_P_HI1 + @.HI1,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI2 = @.OLD_P_HI2 + @.HI2,&#xD;&#xA;&#x9;&#x9;&#x9;P_HI3 = @.OLD_P_HI3 + @.HI3,&#xD;&#xA;&#x9;&#x9;&#x9;P_VS = @.OLD_P_VS + @.VS&#xD;&#xA;&#x9;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;&#x9;(Datum?as = @.TIMESTAMPMARK) and (úst?edna = @.úst?edna)&#x9;&#x9;&#xD;&#xA;" StatementId="16" StatementCompId="22" StatementType="UPDATE" StatementSubTreeCost="0.0132842" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="40">
<RelOp NodeId="0" PhysicalOp="Clustered Index Update" LogicalOp="Update" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132842" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<SimpleUpdate>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="[@.OLD_P_Prodleva]+[@.PRODLEVA]">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_Prodleva" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.PRODLEVA" />
</Identifier>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="[@.OLD_P_nelze_zjistit]+CONVERT_IMPLICIT(smallint,[@.NELZE_ZJISTIT],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_nelze_zjistit" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.NELZE_ZJISTIT" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1005" />
<ScalarOperator ScalarString="[@.OLD_P_DURATION]+CONVERT_IMPLICIT(smallint,[@.DURATION],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_DURATION" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.DURATION" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1006" />
<ScalarOperator ScalarString="[@.OLD_P_OBJECT]+CONVERT_IMPLICIT(smallint,[@.OBJECT],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_OBJECT" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OBJECT" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1007" />
<ScalarOperator ScalarString="[@.OLD_P_SMS]+CONVERT_IMPLICIT(smallint,[@.SMS],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_SMS" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.SMS" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1008" />
<ScalarOperator ScalarString="[@.OLD_P_O_NUMBER]+CONVERT_IMPLICIT(smallint,[@.O_NUMBER],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_O_NUMBER" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_NUMBER" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1009" />
<ScalarOperator ScalarString="[@.OLD_P_O_IMSI]+CONVERT_IMPLICIT(smallint,[@.O_IMSI],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_O_IMSI" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_IMSI" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1010" />
<ScalarOperator ScalarString="[@.OLD_P_O_IMEI]+CONVERT_IMPLICIT(smallint,[@.O_IMEI],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_O_IMEI" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_IMEI" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1011" />
<ScalarOperator ScalarString="[@.OLD_P_O_CELL]+CONVERT_IMPLICIT(smallint,[@.O_CELL],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_O_CELL" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.O_CELL" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1012" />
<ScalarOperator ScalarString="[@.OLD_P_HI1]+CONVERT_IMPLICIT(smallint,[@.HI1],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_HI1" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI1" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1013" />
<ScalarOperator ScalarString="[@.OLD_P_HI2]+CONVERT_IMPLICIT(smallint,[@.HI2],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_HI2" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI2" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1014" />
<ScalarOperator ScalarString="[@.OLD_P_HI3]+CONVERT_IMPLICIT(smallint,[@.HI3],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_HI3" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.HI3" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1015" />
<ScalarOperator ScalarString="[@.OLD_P_VS]+CONVERT_IMPLICIT(smallint,[@.VS],0)">
<Arithmetic Operation="ADD">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_VS" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.VS" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Index="[PK__Snímky__0519C6AF]" />
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@.TIMESTAMPMARK]">
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.úst?edna]">
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky].[P_Prodleva] = RaiseIfNull([Expr1003]),[IRIX].[dbo].[Snímky].[P_Celkem] = RaiseIfNull([@.OLD_P_Celkem]),[IRIX].[dbo].[Snímky].[P_nelze_zjistit] = RaiseIfNull([Expr1004]),[IRIX].[dbo].[Snímky].[P_DURATION] = RaiseIfNull([Expr1005]),[IRIX].[dbo].[Snímky].[P_OBJECT] = RaiseIfNull([Expr1006]),[IRIX].[dbo].[Snímky].[P_SMS] = RaiseIfNull([Expr1007]),[IRIX].[dbo].[Snímky].[P_O_NUMBER] = RaiseIfNull([Expr1008]),[IRIX].[dbo].[Snímky].[P_O_IMSI] = RaiseIfNull([Expr1009]),[IRIX].[dbo].[Snímky].[P_O_IMEI] = RaiseIfNull([Expr1010]),[IRIX].[dbo].[Snímky].[P_O_CELL] = RaiseIfNull([Expr1011]),[IRIX].[dbo].[Snímky].[P_HI1] = RaiseIfNull([Expr1012]),[IRIX].[dbo].[Snímky].[P_HI2] = RaiseIfNull([Expr1013]),[IRIX].[dbo].[Snímky].[P_HI3] = RaiseIfNull([Expr1014]),[IRIX].[dbo].[Snímky].[P_VS] = RaiseIfNull([Expr1015])">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Prodleva" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1003" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_Celkem" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_P_Celkem" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_nelze_zjistit" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_DURATION" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1005" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_OBJECT" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1006" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_SMS" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1007" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_NUMBER" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1008" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMSI" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1009" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_IMEI" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1010" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_O_CELL" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1011" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI1" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1012" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI2" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1013" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_HI3" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1014" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="P_VS" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1015" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</SimpleUpdate>
</RelOp>
<ParameterList>
<ColumnReference Column="@.VS" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.O_CELL" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.O_IMEI" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.O_IMSI" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.O_NUMBER" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.SMS" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.OBJECT" ParameterCompiledValue="(1)" />
<ColumnReference Column="@.DURATION" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.NELZE_ZJISTIT" ParameterCompiledValue="(0)" />
<ColumnReference Column="@.PRODLEVA" ParameterCompiledValue="(120)" />
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-22 08:28:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
<StmtCond StatementText="&#x9;END&#xD;&#xA;&#xD;&#xA;&#x9;-- pokud byla ztoto?něna trasa&#xD;&#xA;&#x9;IF (@.Trasa &lt;&gt; 0)&#xD;&#xA;" StatementId="17" StatementCompId="24" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;-- na?tení starych hodnot, pokud ?ádek existuje&#xD;&#xA;&#x9;&#x9;SELECT&#xD;&#xA;&#x9;&#x9;&#x9;@.OLD_Trasa_P_Celkem = P_Celkem + 1&#xD;&#xA;&#x9;&#x9;FROM&#xD;&#xA;&#x9;&#x9;&#x9;Snímky_Tras&#xD;&#xA;&#x9;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;&#x9;(Datum?as = @.TIMESTAMPMARK) and (úst?edna = @.úst?edna) and (Trasa = @.Trasa)&#xD;&#xA; &#xD;&#xA;&#x9;&#x9;-- zji?tění zda ?ádek neexistuje (pak INSERT), ?i nikoliv (pak UPDATE)&#xD;&#xA;&#x9;" StatementId="18" StatementCompId="25" StatementType="SELECT" StatementSubTreeCost="0.0032832" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="8">
<RelOp NodeId="0" PhysicalOp="Compute Scalar" LogicalOp="Compute Scalar" EstimateRows="1" EstimateIO="0" EstimateCPU="1e-007" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032832" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Column="Expr1003" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smallint,CONVERT_IMPLICIT(int,[IRIX].[dbo].[Snímky_Tras].[P_Celkem],0)+(1),0)">
<Convert DataType="smallint" Style="0" Implicit="1">
<ScalarOperator>
<Arithmetic Operation="ADD">
<ScalarOperator>
<Convert DataType="int" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
</Arithmetic>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp NodeId="1" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
</OutputList>
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Index="[PK__Snímky_Tras__1A14E395]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@.TIMESTAMPMARK]">
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.úst?edna]">
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.Trasa]">
<Identifier>
<ColumnReference Column="@.Trasa" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</ComputeScalar>
</RelOp>
<ParameterList>
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-22 08:28:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
<StmtCond StatementText="&#x9;IF (@.OLD_Trasa_P_Celkem is null)&#xD;&#xA;&#x9;" StatementId="19" StatementCompId="26" StatementType="COND">
<Condition />
<Then>
<Statements>
<StmtSimple StatementText="&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;&#x9;-- ?ádek neexistuje, provádím INSERT na základě vstupních parametr?&#xD;&#xA;&#x9;&#x9;&#x9;INSERT INTO&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Snímky_Tras&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Datum?as,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;úst?edna,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Trasa,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;P_Celkem&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;)&#xD;&#xA;&#x9;&#x9;&#x9;VALUES&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;@.TIMESTAMPMARK,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;@.úst?edna,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;@.Trasa,&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;1&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;)&#xD;&#xA;&#x9;" StatementId="20" StatementCompId="27" StatementType="INSERT" StatementSubTreeCost="0.0165769" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="18">
<RelOp NodeId="1" PhysicalOp="Assert" LogicalOp="Assert" EstimateRows="1" EstimateIO="0" EstimateCPU="1.8e-007" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0165769" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<Assert StartupExpression="0">
<RelOp NodeId="2" PhysicalOp="Nested Loops" LogicalOp="Left Semi Join" EstimateRows="1" EstimateIO="0" EstimateCPU="4.18e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0165767" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Column="Expr1011" />
<ColumnReference Column="Expr1012" />
</OutputList>
<NestedLoops Optimized="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1012" />
</DefinedValue>
</DefinedValues>
<OuterReferences>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</OuterReferences>
<ProbeColumn>
<ColumnReference Column="Expr1012" />
</ProbeColumn>
<RelOp NodeId="3" PhysicalOp="Nested Loops" LogicalOp="Left Semi Join" EstimateRows="1" EstimateIO="0" EstimateCPU="4.18e-006" AvgRowSize="12" EstimatedTotalSubtreeCost="0.0132894" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
<ColumnReference Column="Expr1011" />
</OutputList>
<NestedLoops Optimized="0">
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1011" />
</DefinedValue>
</DefinedValues>
<OuterReferences>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
</OuterReferences>
<ProbeColumn>
<ColumnReference Column="Expr1011" />
</ProbeColumn>
<RelOp NodeId="4" PhysicalOp="Clustered Index Insert" LogicalOp="Insert" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="19" EstimatedTotalSubtreeCost="0.0100022" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</OutputList>
<ScalarInsert>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1003" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(smalldatetime,[@.TIMESTAMPMARK],0)">
<Convert DataType="smalldatetime" Style="0" Implicit="1">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="(1)">
<Const ConstValue="(1)" />
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Index="[PK__Snímky_Tras__1A14E395]" />
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[Datum?as] = RaiseIfNull([Expr1003]),[IRIX].[dbo].[Snímky_Tras].[úst?edna] = RaiseIfNull([@.úst?edna]),[IRIX].[dbo].[Snímky_Tras].[Trasa] = RaiseIfNull([@.Trasa]),[IRIX].[dbo].[Snímky_Tras].[P_Celkem] = [Expr1004]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1003" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.Trasa" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</ScalarInsert>
</RelOp>
<RelOp NodeId="5" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues />
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Index="[PK__Snímky__0519C6AF]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky]" Column="úst?edna" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[Datum?as]">
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[úst?edna]">
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp NodeId="6" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0032831" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" NoExpandHint="0">
<DefinedValues />
<Object Database="[IRIX]" Schema="[dbo]" Table="[Trasy]" Index="[PK__Trasy__15502E78]" />
<SeekPredicates>
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Trasy]" Column="Trasa" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[Trasa]">
<Identifier>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="CASE WHEN [Expr1011] IS NULL THEN (0) ELSE CASE WHEN [Expr1012] IS NULL THEN (1) ELSE NULL END END">
<IF>
<Condition>
<ScalarOperator>
<Logical Operation="IS NULL">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1011" />
</Identifier>
</ScalarOperator>
</Logical>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="(0)" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<IF>
<Condition>
<ScalarOperator>
<Logical Operation="IS NULL">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1012" />
</Identifier>
</ScalarOperator>
</Logical>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Predicate>
</Assert>
</RelOp>
<ParameterList>
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-22 08:28:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Then>
<Else>
<Statements />
</Else>
</StmtCond>
<StmtSimple StatementText="&#x9;END&#xD;&#xA;&#x9;&#x9;ELSE&#xD;&#xA;&#x9;&#x9;BEGIN&#xD;&#xA;&#x9;&#x9;&#x9;-- ?ádek existuje, provádím UPDATE&#xD;&#xA;&#x9;&#x9;&#x9;UPDATE&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Snímky_Tras&#xD;&#xA;&#x9;&#x9;&#x9;SET&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;P_Celkem = @.OLD_Trasa_P_Celkem&#xD;&#xA;&#x9;&#x9;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(Datum?as = @.TIMESTAMPMARK) and (úst?edna = @.úst?edna) and (Trasa = @.Trasa)&#xD;&#xA;&#x9;" StatementId="21" StatementCompId="30" StatementType="UPDATE" StatementSubTreeCost="0.0132841" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="8">
<RelOp NodeId="0" PhysicalOp="Clustered Index Update" LogicalOp="Update" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132841" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<SimpleUpdate>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Index="[PK__Snímky_Tras__1A14E395]" />
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Datum?as" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="úst?edna" />
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="Trasa" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@.TIMESTAMPMARK]">
<Identifier>
<ColumnReference Column="@.TIMESTAMPMARK" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.úst?edna]">
<Identifier>
<ColumnReference Column="@.úst?edna" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[@.Trasa]">
<Identifier>
<ColumnReference Column="@.Trasa" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Snímky_Tras].[P_Celkem] = RaiseIfNull([@.OLD_Trasa_P_Celkem])">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Snímky_Tras]" Column="P_Celkem" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.OLD_Trasa_P_Celkem" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</SimpleUpdate>
</RelOp>
<ParameterList>
<ColumnReference Column="@.TIMESTAMPMARK" ParameterCompiledValue="'2006-06-22 08:28:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Then>
</StmtCond>
<StmtSimple StatementText="&#x9;END&#xD;&#xA;&#x9;END&#xD;&#xA;&#xD;&#xA;&#x9;-- aktualizace IRI(ID)&#xD;&#xA;&#x9;UPDATE&#xD;&#xA;&#x9;&#x9;Sherman&#xD;&#xA;&#x9;SET&#xD;&#xA;&#x9;&#x9;Sh_ID = @.ID,&#xD;&#xA;&#x9;&#x9;DBTIME = @.DBTIME,&#xD;&#xA;&#x9;&#x9;Aktualizováno = GETDATE()&#xD;&#xA;&#x9;WHERE&#xD;&#xA;&#x9;&#x9;ID = 0;&#xD;" StatementId="22" StatementCompId="33" StatementType="UPDATE" StatementSubTreeCost="0.0132842" StatementEstRows="1" StatementOptmLevel="TRIVIAL">
<QueryPlan CachedPlanSize="8">
<RelOp NodeId="0" PhysicalOp="Clustered Index Update" LogicalOp="Update" EstimateRows="1" EstimateIO="0.01" EstimateCPU="1e-006" AvgRowSize="9" EstimatedTotalSubtreeCost="0.0132842" Parallel="0" EstimateRebinds="0" EstimateRewinds="0">
<OutputList />
<SimpleUpdate>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="ConstExpr1010">
<ScalarOperator ScalarString="getdate()">
<Intrinsic FunctionName="getdate" />
</ScalarOperator>
</ColumnReference>
<ScalarOperator ScalarString="getdate()">
<Identifier>
<ColumnReference Column="ConstExpr1010">
<ScalarOperator>
<Intrinsic FunctionName="getdate" />
</ScalarOperator>
</ColumnReference>
</Identifier>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Index="[PK__Sherman__182C9B23]" />
<SeekPredicate>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Column="ID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekPredicate>
<SetPredicate>
<ScalarOperator ScalarString="[IRIX].[dbo].[Sherman].[Sh_ID] = RaiseIfNull([@.ID]),[IRIX].[dbo].[Sherman].[DBTIME] = RaiseIfNull([@.DBTIME]),[IRIX].[dbo].[Sherman].[Aktualizováno] = RaiseIfNull(getdate())">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Column="Sh_ID" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.ID" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Column="DBTIME" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@.DBTIME" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Database="[IRIX]" Schema="[dbo]" Table="[Sherman]" Column="Aktualizováno" />
<ScalarOperator>
<Intrinsic FunctionName="RaiseIfNull">
<ScalarOperator>
<Identifier>
<ColumnReference Column="ConstExpr1010">
<ScalarOperator>
<Intrinsic FunctionName="getdate" />
</ScalarOperator>
</ColumnReference>
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</SimpleUpdate>
</RelOp>
<ParameterList>
<ColumnReference Column="@.DBTIME" ParameterCompiledValue="'2006-06-22 08:30:19.000'" />
<ColumnReference Column="@.ID" ParameterCompiledValue="(32214847)" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
</BatchSequence>
</ShowPlanXML>

|||

ParameterCompiled value is the value that was passed to the statement when it was compiled and cached. In your case one plan was cached with the value of 1, the other with the value of 0.

The times are also in microseconds (1 millionth of a second), not milliseconds (1 thousandth of a second).

At 122 microseconds this is still blistering fast, and with a difference of 76 microseconds in execution time it would take over 13000 end to end executions before there was a full second of difference in execution time.

Since this is express there will be only 1 scheduler for user queries. Are some of the systems supporting more simultaneous connections?

|||

WOW, microsecs? This is incredible. I do not understand how execution can take up to 0,05 sec. I'm measuring in C# this way:

starttime = DateTime.Now();

ExecuteNonQuery();

endtime = DateTime.Now();

All systems are accessed by one connection only.

|||

There are numerous layers between C# and execution in the server. SqlClient must consume the results and produce datasets, there are protocols that must be negotiated in both the client app and the server before the query is submitted and the results are produced.

To get real execution time for each query run it from sqlcmd.

The format would be

set statistics time on

set statistics profile on

set statistics io on

<your query here>

In the output you will have the time for parsing and compiling each statement, the number of logical and physical IO's and a run time plan with both estimated and actual row counts.

From that you should be able to determine whether the slowdown is in the server, or between the app and the server.

|||

Is there any chance how to set this statistics in app or server side, not via sqlcmd, because i'm executing stored procedures with a lot of parameters, please?

Thank you Jerome for kind help.

|||

You can set these in the app, but you need to retrieve the output which will include multiple result sets, and several messages. You can also set the parameters when submitting the batch from sqlcmd, but either way works.

sql