Easier SQL Statement

Results 1 to 3 of 3

Thread: Easier SQL Statement

  1. #1
    Join Date
    Dec 1969

    Default Easier SQL Statement

    I have the following SQL statement ...<BR><BR>SELECT desktop_id<BR>FROM client<BR>WHERE desktop_id NOT IN<BR>(<BR>SELECT desktop_id<BR>FROM member<BR>)<BR><BR>Is there an faster process SQL query that will do the same thing?

  2. #2
    Join Date
    Dec 1969

    Default RE: Easier SQL Statement

    select client.desktop_id from client left outer join member <BR>on client.desktop_id = member.desktop_id<BR>where member.desktop_id is null<BR><BR>It might be faster. If two statements return the same result, there is no way telling whether one or the other is inherently faster.

  3. #3
    Join Date
    Dec 1969

    Default Ways to tell

    Sure there are ways to tell whether one query is faster than another. <BR><BR>1.Time it w/ a stop watch! If there&#039;s a big difference you can tell. <BR><BR>2.If you&#039;re using SQL Server you can put two queries in Query Analyzer.. Select Query -&#062; Show Execution plan and see which one took longer... Even if they both execute real fast<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts