Whenever anything flaky happens, I suggest running the Verify & Repair tool. If errors are reported, try running this tool over and over until (hopefully) no errors are reported. (I haven’t seen an error report on my big DT Pro 1.9 beta database for a LONG time.)
If no errors are reported, close DT and do the housekeeping routines recommended below.
If the Verify & Repair tool cannot fix errors and DT recommends that you Rebuild the database, you have three choices:
 Assuming that you had previously run Verify & Repair and Backup & Optimize recently, when everything was working properly (it’s highly recommended that these tools be run whenever you’ve been adding lots of content, and before closing DT after a day’s work), you might consider the Restore Backup option. This will restore your database to a presumably sound backup that was made earlier.
Note: If you have been adding new content since the last time you ran Backup & Optimize, there’s a way to recover the recently added items. Just open the groups to which you’ve added material, do a date sort, select the new items and Export them using the Files & Folders option for each group containing new items (this will retain metadata such as URLs and comments for the exported items). Note: Create a new folder and give it a descriptive name for each group of selected items, if multiple exports are made.
Now go to Tools > Restore Backup and select the tool. This will restore your database to the last backup. Run Tools > Verify & Repair. If all is well, you can import the files you just exported, to bring your database back up to date. First, I would create a new group to which the imports will be sent, and go to Preferences > Import and select that group for new imports. Now choose File > Import > Files and Folders and select the exported folders. The content will be moved into your database to your selected new group. All you have to do now is replace the items into your preferred organization of groups. After completing this you may delete the temporary holding group that you had created to hold the reimported items.
If all went well, you have a working, updated database. Now run Verify & Repair followed by Backup & Optimize. Close DT. Highly recommended: Make a backup of your database to an external drive, CD and/or to another location on your drive.
Perform the housekeeping routines recommended below.
 Choose Tools > Rebuild Database. DT will export all the groups and their contents to your drive, then import them back. If you have a large database, this will take some time. Note: A “bad” text file or other problem could result in a stall during the export phase, and the Rebuild Database option may not go to completion. If this happens, try a manual File > Export > Files and Folders export, choosing groups one at a time. Then manually do the Files > Import > Files and Folders routine. Note: If there’s a stall during export of a selected group, you may need to select portions of it to export as much as possible, and you may lose one or more items that cannot be exported.
If Rebuild Database ran to completion, run Tools > Verify & Repair followed by Backup & Optimize. Close DT. Make an external backup. Run the housekeeping operations recommended below.
But if Rebuild Database failed and you did a manual export of your database contents, do this: Close DT. Remove your existing database file, for example, by copying it to another location. Now open DT and create a new, empty database. Import the previously exported folders, using File > Import > Files and Folders. Run Verify & Repair, followed by Backup & Repair. Close DT. Run the housekeeping operations recommended below.
 If you have made a recent external backup of your database, that may be the solution to your problems. Check the data of your last external backup, using Finder > Show Info. Have you added any content since that date? If so, follow the procedures outlined in  above to export information added since that date from your current DT database.
Now CLOSE DEVONthink (important). After doing the housekeeping operations recommended below, copy the external backup file over your DT database. Open DT and import any new items (as in item , above). Run the Verify & Repair and Backup & Optimize tools. You should now have a sound, updated database. Make an external backup!
Sometimes, just quitting and relaunching an application can get rid of flaky behavior. Corruption of the application in memory might have happened, perhaps as the result of a conflict with another application or a haxie that modified the system (DEVONtechnologies is generally suspicious of haxies). Or maybe a cosmic ray came through and twiddled a bit in RAM. Who knows?
Your System and hard drive do require periodic maintenance to keep them up to speed and to eliminate problems that can creep in over time.
Because OS X is a UNIX operating system, cron file routines need to be run periodically. There are a number of applications that can do this, as well as clean out cache files (that may become corrupted over time), update/rotate log files, repair Permissions, etc. I use Ccktail (replace the '’ with ‘o’ to read the name) to perform these functions at least weekly.
Disk Utilities can be used to do Permissions repair. To use Disk Utilities to correct directory errors that may happen from time to time, boot from your OS X installation disk 1 and choose File > Disk Utilities > Disk First Aid to correct any errors. I use Disk Warrior once in a while to find and correct any errors that Disk First Aid doesn’t catch.
Rarely, your DEVONthink preferences file can become corrupted. If all else fails and DT still behaves strangely, find and remove this file at your userdirectory/Library/Preferences/com.devon-technologies.think.plist. This file will be recreated next time you launch DEVONthink, but you will have to reenter any preferences you had previously modified.
Some people pride themselves on how long they can keep OS X running without a restart. That’s all very well. But with a large DT database and my practice of keeping a number of applications open at the same time, performance slows over time. A restart every few days speeds things up again.
Sorry for the length of this post, but these are some of the practices that have paid off for me.