You are here: Re: Stored procedure and SQL Job Agent Task « MsSQL Server « IT news, forums, messages
Re: Stored procedure and SQL Job Agent Task

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация