Results from Subquery Limited to 25,000?

  • I have the following query:

    Select [SessionID]

    From [dbo].[OldSessions]

    Where SessionID not in

    (Select SessionID from [dbo].[NewSessions])

    When the number of records in the OldSessions table that don't have corresponding records in the NewSessions table is less than 25,000 the query returns the correct number of records.

    When the number of records meeting the condition is greater than 25,000 the query only returns 25,000 records.

    I've never heard of a limit on the number of records a subquery would return, but it appears something like that is happening.

    Has anyone else run into this?

    Thanks!

  • Oops, never mind! 😀

    This query is supposed to see how many records have been deleted by another process, and I just discovered that whoever wrote the other process limited the number of records it would delete to 25,000.

    So the query in question is performing correctly.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply