Jump to content

Topic on Talk:Quarry

What's more efficient: AND NOT, not in, <>

2
Enhancing999 (talkcontribs)

Which is more efficient?

  • AND NOT ( lt_title = "ABC" ) AND NOT ( lt_title = "XYZ")
  • AND NOT in ( "ABC", "XYZ")
  • AND lt_title <> "ABC" AND lt_title <> "XYZ"

Agree that none is ideal.

Matěj Suchánek (talkcontribs)

As the first thing, the query engine builds a query plan, then executes the query according to the plan. You can check if the query plan is always the same (e.g., using Toolforge SQL Optimizer). If it is, there is no difference.

I prefer NOT IN.

Reply to "What's more efficient: AND NOT, not in, <>"