Try each of the following steps in order until the issue is resolved:
 
  1. Recreate the query from scratch
  2. Check the integrity of the database
  3. Rebuild indexes