|
Posted by vikram.mankar on 02/06/07 22:34
The application logs "raw" data. The SQL Job (stored procedure) is
adding attributes to that data and moving it to "report" tables. The
cursor was used to select the right attributes based on the data
logged.
The application is logging data from a hardware device (PLC) thats
generating data faster than the application can accept (at times) ..
hence the issue of duplicates to avoid any data loss during the timing
issue. There is unfortunately no way to control the duplicate problem
at the application level. But since its generating data so fast - we
need to just dump the raw data in a table and then copy it for
reporting purposes.
On Feb 6, 5:32 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> (vikram.man...@gmail.com) writes:
> > Would NOT EXISTS add any overhead to the query? The application
> > logging data to the SQL server is using OLEDB and as a test is
> > currently logging nearly 10000 rows in the table every minute. I was
> > wondering if NOT EXISTS would actually slow down the INSERT.
>
> I am a little confused here. In your original post you talked about an
> Agent job and you even mentioned a cursor. Now you are talking about
> an application that logs data.
>
> But let's say that we are talking about application logging now. Then I
> am curious: how come the application is (attempting to) logging duplicates?
>
> As for the question as such, NOT EXISTS may add an overhead, but so will
> an error that has to be rolled back.
>
> --
> Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
>
> Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|