BLAST is fast because it takes shortcuts, and those same shortcuts are why it can miss real matches. Optimizing it mostly means deciding how many shortcuts your question can afford. The defaults are a middle setting, not the best choice for every search. For very large jobs, the biggest gains often come from more hardware or a different tool rather than from any single setting.
Word Size and Seed Thresholds Set the Basic Trade-Off
BLAST first looks for short exact or near-exact matches between your query and the database. These are called seeds or words, and only they get extended.1Journal of Molecular Biology. Basic Local Alignment Search Tool Each seed hit is stretched outward to see whether it sits inside a longer, high-scoring match.1Journal of Molecular Biology. Basic Local Alignment Search Tool A true relative that lacks a qualifying short seed is never examined at all.
Take the protein stretch LKVGA. With a word size of 3, BLAST splits it into overlapping three-letter words (LKV, KVG, VGA) and searches for each of them, and for similar words, in the database. Every position in the query produces a word, so a longer query means more seeds to check, which is one reason long queries run slower.
Word size is the main dial. It controls how long those initial matches must be. Larger word sizes make searches faster but less sensitive, and smaller ones make them slower but more sensitive.2PubMed Central. How BLAST works The default nucleotide program, megablast, uses larger words than traditional blastn, which is partly why it is faster but misses more.2PubMed Central. How BLAST works
For near-identical sequences, such as checking a clone, megablast’s large words are ideal. For a gene from a related species, switch to blastn or discontiguous megablast, which catch more. Be careful with small words on huge databases, because shrinking the word size can multiply the run time. Change one setting at a time so you can see what each change does.
A sign that a search is not sensitive enough is when known relatives are missing from the results. Rerun a sample query with smaller words before you rerun everything.
For proteins, the neighborhood threshold matters too. BLAST also accepts similar words that score above a cutoff called the neighborhood word-score threshold, and about 50 such similar words are usually kept for each word in the query.3PubMed Central. Having a BLAST with bioinformatics (and avoiding BLASTphemy) A higher threshold gives more speed but a greater chance of missing relevant pairs.3PubMed Central. Having a BLAST with bioinformatics (and avoiding BLASTphemy) A lower one produces more hits to check, which lengthens run time.1Journal of Molecular Biology. Basic Local Alignment Search Tool Allowing longer protein words of 6 or 7 letters, with the threshold tuned, can cut run time by 20–30% with similar accuracy.4PubMed. Improved BLAST searches using longer words for protein seeding
Pick a Scoring Matrix That Matches How Related Your Sequences Are
A scoring matrix assigns points for each pair of amino acids; BLOSUM62 is the default for proteins.3PubMed Central. Having a BLAST with bioinformatics (and avoiding BLASTphemy) Different matrices work best at different evolutionary distances.5PubMed Central. Selecting the Right Similarity-Scoring Matrix Deep matrices like BLOSUM62 and BLOSUM50 target matches with about 20–30% identity.5PubMed Central. Selecting the Right Similarity-Scoring Matrix Shallow matrices such as VTML10–VTML80 target matches sharing 50–90% identity.5PubMed Central. Selecting the Right Similarity-Scoring Matrix
In practice, for closely related sequences, choose BLOSUM80 or a low PAM matrix.6QIAGEN Bioinformatics. How to Optimize BLAST for Speed and Sensitivity For distant relatives, choose BLOSUM45 or a high PAM matrix such as PAM250.6QIAGEN Bioinformatics. How to Optimize BLAST for Speed and Sensitivity Gaps are scored with an opening penalty plus a smaller penalty for each extra position.3PubMed Central. Having a BLAST with bioinformatics (and avoiding BLASTphemy) The NCBI page offers gap opening penalties of 7–9 with an extension penalty of 2, or 10–12 with an extension penalty of 1.3PubMed Central. Having a BLAST with bioinformatics (and avoiding BLASTphemy)
A wrong matrix hurts in both directions. A deep matrix on near-identical sequences can produce overly long, padded alignments. A shallow matrix on distant proteins can make true relatives score as noise. Gap penalties usually have to change along with the matrix, and the web form helps by offering only valid combinations of matrix and gap penalties.
For distant protein relatives, run the default BLOSUM62 search first. If expected relatives are missing, rerun with BLOSUM45. Then compare the new hits against known family members before trusting them.
Filtering and Expect Thresholds Clean Up or Widen Results
The low-complexity filter masks repetitive stretches of your query, using SEG for proteins and DUST for DNA.7PubMed Central. BLAST Search Parameters That removes hits that look statistically significant but mean nothing biologically, such as matches to common acid- or proline-rich regions.7PubMed Central. BLAST Search Parameters Keep the filter on for most searches.
Filtering can also hide what you want. Real proteins can contain biologically important repetitive domains. Masked regions show as lowercase letters or X’s in the alignment, so if a known domain disappears, turn the filter off and compare the two results.
The expect threshold, or E-value, sets how many chance matches you are willing to see. It estimates how many hits with at least that score you would expect to find by chance in a database of this size, so an E-value of 1 means about one chance match is expected. A lower E-value means a match is less likely to be due to chance. Because it depends on database size, the same alignment gets a worse E-value when searched against a bigger database. A tiny value such as 1e-50 signals a very unlikely chance match, but it says nothing alone about whether the match matters for your question. A strict threshold such as 0.1 suits function prediction, while a loose one suits exploration.
Special cases reverse the defaults. For checking short PCR primers, decrease the word size to 7, raise the expect threshold to 1000, and turn off the filter.8Integrated DNA Technologies. Using Primer-BLAST to find PCR primers-tips from IDT
A short alignment can only earn a small score, and a small score is always likely to occur by chance somewhere in a large database. That is why a perfect 20-letter primer match can still get an E-value above the default cutoff and vanish from the report. Raising the threshold lets those hits show, but you must then judge them yourself by checking identity and alignment length.
Profile Searches Find Relatives Ordinary BLAST Misses
PSI-BLAST builds a profile from its first hits, called a PSSM (position-specific scoring matrix), and searches again with it. A single query treats every position equally, but a profile records which positions stay the same across relatives and which vary freely. Conserved positions then count heavily and variable ones count little, so a distant protein that keeps only the key positions can still score well. That is how a profile picks up relatives that share too little overall similarity for a single-sequence search.
Adjusting the scoring for each database sequence’s amino acid makeup, called composition-based statistics, raised PSI-BLAST’s accuracy score from about 0.76 to 0.90.9Nucleic Acids Research / Oxford Academic. Improving the accuracy of PSI-BLAST protein database searches with composition-based statistics and other refinements DELTA-BLAST searches a library of ready-made domain profiles first, giving better detection of relatives.10PubMed Central. Domain enhanced lookup time accelerated BLAST Newer two-layer methods built on PSI-BLAST outperform both PSI-BLAST and DELTA-BLAST on a standard benchmark.11PubMed. S2L-PSIBLAST: a supervised two-layer search framework based on PSI-BLAST for protein remote homology detection
In PSI-BLAST, round one is an ordinary protein search, and hits below the inclusion threshold are used to build the first profile. Round two searches the database with that profile and often returns new, more distant hits. Each later round rebuilds the profile from the enlarged set, so the search keeps widening until nothing new passes the threshold.
Each extra round adds sensitivity but takes more time. An unrelated sequence that slips into the profile can pull in false families, so inspect the hits before each new round, and stop when no new reliable hits appear.
DELTA-BLAST is a good first choice for a single unknown protein. PSI-BLAST lets you control which sequences build the profile. Both are offered on the NCBI protein BLAST page.
Speed Up Large Jobs With Threads, GPUs and Indexes
Complex queries gain more from extra threads, while simple queries max out with only a few threads.12Azure High Performance Computing (HPC) Blog. Running NCBI BLAST on Azure – Performance, Scalability and Best Practice More threads lower the absolute run time, but the best way to split up the data stays the same.13PubMed Central. Profiling the BLAST bioinformatics application for load balancing on high-performance computing clusters So for a batch of simple queries, give each job fewer threads and run more jobs side by side.
Setting threads higher than your CPU’s cores will not make BLAST faster, because the extra threads compete for the same cores. On the command line the thread count is set with the num_threads option, and the default is a single thread.
GPUs can help more. G-BLASTN runs about 14.8 times faster than single-core BLAST in megablast mode, and about 7 times faster than 4 cores.14PubMed. G-BLASTN: accelerating nucleotide alignment by graphics processors In blastn mode the gain shrinks to about 4.3 times over 1 core and 1.6 times over 4 cores.14PubMed. G-BLASTN: accelerating nucleotide alignment by graphics processors Its pipeline mode adds up to 44% more speed for batches of queries.14PubMed. G-BLASTN: accelerating nucleotide alignment by graphics processors For proteins, GPU-BLAST runs searches 3–4 times faster than single-threaded BLAST, and nearly twice as fast as 6 threads.15PubMed Central. GPU-BLAST: using graphics processors to accelerate protein sequence alignment
An indexed megablast database stores the positions of short DNA words ahead of time, with default lengths of 16 for seeds and 12 for words.16PubMed Central. Database indexing for production MegaBLAST searches Repeated searches then skip rebuilding a lookup table on every run. Newer index designs take up less space and are faster than the megablast index.17PubMed Central. High speed BLASTN: an accelerated MegaBLAST search tool
None of these changes the hits you get. Threads, GPUs and indexes do the same search faster without changing the settings, unlike a larger word size, which can drop real hits. Still, check a GPU tool’s results against standard BLAST on a test set before switching over.
When to Switch to DIAMOND or MMseqs2
DIAMOND can be about 8,000 times faster than BLASTP in its fastest mode, and still about 80 times faster at matching sensitivity.18PubMed Central. Sensitive protein alignments at tree-of-life scale using DIAMOND Its sensitive modes match or slightly beat BLAST at low error rates, and fall slightly behind only at error levels rarely used in practice.18PubMed Central. Sensitive protein alignments at tree-of-life scale using DIAMOND DIAMOND also ran 12–15 times faster than MMseqs2 with similar sensitivity.18PubMed Central. Sensitive protein alignments at tree-of-life scale using DIAMOND
DIAMOND’s defaults are tuned for speed, so it can skip a distant relative that BLAST would catch. Under default settings, BLASTp and MMseqs2 beat DIAMOND at predicting gene function.19PubMed Central. A large-scale assessment of sequence database search tools for homology-based protein function prediction With tuned settings, DIAMOND matched or slightly beat them while running more than 7 times faster than BLASTp.19PubMed Central. A large-scale assessment of sequence database search tools for homology-based protein function prediction Never run DIAMOND on default settings if sensitivity matters.
When pairing up matching genes between two genomes, LAST is fastest but finds the fewest pairs between distant genomes.20PubMed Central. Progress in quickly finding orthologs as reciprocal best hits: comparing blast, last, diamond and MMseqs2 DIAMOND’s very-sensitive mode gave the best balance, taking about 5–7% of blastp’s time.20PubMed Central. Progress in quickly finding orthologs as reciprocal best hits: comparing blast, last, diamond and MMseqs2 MMseqs2 produced the lowest error rates.20PubMed Central. Progress in quickly finding orthologs as reciprocal best hits: comparing blast, last, diamond and MMseqs2 So DIAMOND suits large-scale function prediction, MMseqs2 suits work where low error rates matter most, and LAST suits quick comparisons of closely related genomes.
For a few queries on the website, BLAST remains the simplest choice. With a handful of queries it finishes in minutes, and the time spent learning a new tool outweighs the saving. When a BLAST run would take days, such as millions of metagenomic reads against a large protein database, or whole proteomes, a faster tool changes what is practical. Estimate your BLAST run time on a small sample first, and validate a sample of the alternative’s results against BLAST before relying on it.

