Viewing 15 posts - 1 through 15 (of 15 total)
Thank you!
Always nice to know that a problem actually has a name =)
Your example worked great.
What if I only would like to select those personIds which has the last...
November 8, 2013 at 11:57 pm
Ahh sorry didnt think about that.
The "real" table has an identity primary key. I've updated the example code to include a identity key column to use for ordering.
November 8, 2013 at 8:37 am
I guess the result will group by personId so i only need the personId selected and in the test data only personId=1 meets the requirements of three activityid=2 in-a-row.
(I need...
November 8, 2013 at 5:52 am
The result only need to contain the personId. I am only interested to get those personid which has 3 equal acitivyid in a row per person.
Given a person has the...
November 8, 2013 at 5:09 am
In my opinion error handling shouldn't be handled within an sp/query/method. Catching all exceptions can suppress other important errors which we wouldn't know about if we just return some default...
June 20, 2012 at 1:07 am
I could but I wont =)
I'am not a big fan of exception driven code/queries.
June 19, 2012 at 7:39 am
Hi!
Yep its a .net application.
I'am not checking for existing records before inserting. I guessed it would be faster to just do a check-insert than first a check from application and...
June 19, 2012 at 7:22 am
Nice and simple.
Is that _the_ way to do check-inserts? I've read many posts on check-inserts, everyone seems to have their own way to do them.
June 19, 2012 at 6:00 am
Hehe =)
I don't know why my query would affect data integrity? I thought the db design (keys/constraints) was the integrity.
I'am just after a fast way to check-insert data without getting...
June 19, 2012 at 5:12 am
Thanks for your reply!
The table is quite busy and contain 10M+ rows what would be the best for performance?
When comparing a merge version of the query and my original query...
June 19, 2012 at 2:20 am
Dev (1/3/2012)
We have a table "Person" (PersonId int PK for relations) and about 20 additional columns describing the person (Firstname, lastname, email) etc. (The fields can vary depending...
January 3, 2012 at 8:56 am
Grant Fritchey (1/3/2012)
chandan_jha18 (1/3/2012)
Jeff Moden (1/3/2012)
Dev (1/3/2012)
chandan_jha18 (1/3/2012)
Dev (1/3/2012)
chandan_jha18 (1/3/2012)
Jeff Moden (1/3/2012)
January 3, 2012 at 8:51 am
Dev (1/3/2012)
I've tried to output the inserted personids into a @table variable and #temptable with no diff in performance.
It might not be true. How did you measure this...
January 3, 2012 at 8:49 am
Hi
The steps are not running in a single transaction. Only step 5&6 run in the same transaction
Edit: update statistics Person with fullscan had no effect on query plan.
January 3, 2012 at 5:09 am
Viewing 15 posts - 1 through 15 (of 15 total)