Splunk Cheat Sheet: Search and Query Commands (2024)

Whether you’re a cyber security professional, data scientist, or system administrator when you mine large volumes of data for insights using Splunk, having a list of Splunk query commands at hand helps you focus on your work and solve problems faster than studying the official documentation.

This article is the convenient list you need. It provides several lists organized by the type of queries you would like to conduct on your data: basic pattern search on keywords, basic filtering using regular expressions, mathematical computations, and statistical and graphing functionalities.

The following Splunk cheat sheet assumes you have Splunk installed. It is a refresher on useful Splunk query commands. Download a PDF of this Splunk cheat sheet here.

Table Of Contents

  1. Brief Introduction of Splunk
  2. Search Language in Splunk
  3. Common Search Commands
  4. SPL Syntax
  5. Index Statistics
  6. Reload apps
  7. Debug Traces
  8. Configuration
  9. Capacity Planning
  10. Frequently Asked Questions

Brief Introduction of Splunk

The Internet of Things (IoT) and Internet of Bodies (IoB) generate much data, and searching for a needle of datum in such a haystack can be daunting.

Splunk is a Big Data mining tool. With Splunk, not only is it easier for users to excavate and analyze machine-generated data, but it also visualizes and creates reports on such data.

Splunk Enterprise search results on sample data

Splunk contains three processing components:

  • The Indexer parses and indexes data added to Splunk.
  • The Forwarder (optional) sends data from a source.
  • The Search Head is for searching, analyzing, visualizing, and summarizing your data.
Splunk Cheat Sheet: Search and Query Commands (2)

Search Language in Splunk

Splunk uses what’s called Search Processing Language (SPL), which consists of keywords, quoted phrases, Boolean expressions, wildcards (*), parameter/value pairs, and comparison expressions. Unless you’re joining two explicit Boolean expressions, omit the AND operator because Splunk assumes the space between any two search terms to be AND.

Basic Search offers a shorthand for simple keyword searches in a body of indexed data myIndex without further processing:

index=myIndex keyword

An event is an entry of data representing a set of values associated with a timestamp. It can be a text document, configuration file, or entire stack trace. Here is an example of an event in a web activity log:

[10/Aug/2022:18:23:46] userID=176 country=US paymentID=30495

Search commands help filter unwanted events, extract additional information, calculate values, transform data, and statistically analyze the indexed data. It is a process of narrowing the data down to your focus. Note the decreasing number of results below:

Splunk Cheat Sheet: Search and Query Commands (3)

Common Search Commands

CommandDescription
chart, timechartReturns results in a tabular output for (time-series) charting
dedup XRemoves duplicate results on a field X
evalCalculates an expression (see Calculations)
fieldsRemoves fields from search results
head/tail NReturns the first/last N results, where N is a positive integer
lookupAdds field values from an external source
renameRenames a field. Use wildcards (*) to specify multiple fields.
rexExtract fields according to specified regular expression(s)
searchFilters results to those that match the search expression
sort XSorts the search results by the specified fields X
statsProvides statistics, grouped optionally by fields
mstatsSimilar to stats but used on metrics instead of events
tableDisplays data fields in table format.
top/rareDisplays the most/least common values of a field
transactionGroups search results into transactions
whereFilters search results using eval expressions. For comparing two different fields.

SPL Syntax

Begin by specifying the data using the parameter index, the equal sign =, and the data index of your choice: index=index_of_choice.

Complex queries involve the pipe character |, which feeds the output of the previous query into the next.

Basic Search

This is the shorthand query to find the word hacker in an index called cybersecurity:

index=cybersecurity hacker

SPL search termsDescription
Full Text Search
CybersecurityFind the word “Cybersecurity” irrespective of capitalization
White Black HatFind those three words in any order irrespective of capitalization
"White Black+Hat"Find the exact phrase with the given special characters, irrespective of capitalization
Filter by fields
source="/var/log/myapp/access.log" status=404All lines where the field status has value 404 from the file /var/log/myapp/access.log
source="bigdata.rar:*" index="data_tutorial" Code=REDAll entries where the field Code has value RED in the archive bigdata.rar indexed as data_tutorial
index="customer_feedback" _raw="*excellent*"All entries whose text contains the keyword “excellent” in the indexed data set customer_feedback
Filter by host
host="myblog" source="/var/log/syslog" FatalShow all Fatal entries from /var/log/syslog belonging to the blog host myblog
Selecting an index
index="myIndex" passwordAccess the index called myIndex and text matching password.
source="test_data.zip:*"Access the data archive called test_data.zip and parse all its entries (*).
sourcetype="datasource01"(Optional) Search data sources whose type is datasource01.

This syntax also applies to the arguments following the search keyword. Here is an example of a longer SPL search string:

index=* OR index=_* sourcetype=generic_logs | search Cybersecurity | head 10000

In this example, index=* OR index=_* sourcetype=generic_logs is the data body on which Splunk performs search Cybersecurity, and then head 10000 causes Splunk to show only the first (up to) 10,000 entries.

Basic Filtering

You can filter your data using regular expressions and the Splunk keywords rex and regex. An example of finding deprecation warnings in the logs of an app would be:

index="app_logs" | regex error="Deprecation Warning"

SPL filtersDescriptionExamples
searchFind keywords and/or fields with given valuesindex=names | search Chris
index=emails | search
emailAddr="*mysite.com"
regexFind expressions matching a given regular expressionFind logs not containing IPv4 addresses:
index=syslogs | regex
!="^\d{1,3}.\d{1,3}\.\d{1,3}\.\d{1,3}"
rexExtract fields according to specified regular expression(s) into a new field for further processingExtract email addresses:
source="email_dump.txt" | rex
field=_raw "From:
<(?<from>.*)> To: <(?<to>.*)>"

The biggest difference between search and regex is that you can only exclude query strings with regex. These two are equivalent:

  • source="access.log" Fatal
  • source="access.log" | regex _raw=".*Fatal.*"

But you can only use regex to find events that do not include your desired search term:

  • source="access.log" | regex _raw!=".*Fatal.*"

The Splunk keyword rex helps determine the alphabetical codes involved in this dataset:

Splunk Cheat Sheet: Search and Query Commands (4)

Calculations

Combine the following with eval to do computations on your data, such as finding the mean, longest and shortest comments in the following example:

index=comments | eval cmt_len=len(comment) | stats

avg(cmt_len), max(cmt_len), min(cmt_len) by index

FunctionReturn value / ActionUsage:eval foo=…
abs(X)absolute value of Xabs(number)
case(X,"Y",…)Takes pairs of arguments X and Y, where X arguments are Boolean expressions. When evaluated to TRUE, the arguments return the corresponding Y argumentcase(id == 0, "Amy", id == 1,"Brad", id == 2, "Chris")
ceil(X)Ceiling of a number Xceil(1.9)
cidrmatch("X",Y)Identifies IP addresses that belong to a particular subnetcidrmatch("123.132.32.0/25",ip)
coalesce(X,…)The first value that is not NULLcoalesce(null(), "Returned val", null())
cos(X)Cosine of Xn=cos(60) #1/2
exact(X)Evaluates an expression X using double precision floating point arithmeticexact(3.14*num)
exp(X)e (natural number) to the power X (eX)exp(3)
if(X,Y,Z)If X evaluates to TRUE, the result is the second argument Y. If X evaluates to FALSE, the result evaluates to the third argument Zif(error==200, "OK", "Error")
in(field,valuelist)TRUE if a value in valuelist matches a value in field. You must use the in() function embedded inside the if() functionif(in(status, "404","500","503"),"true","false")
isbool(X)TRUE if X is Booleanisbool(field)
isint(X)TRUE if X is an integerisint(field)
isnull(X)TRUE if X is NULLisnull(field)
isstr(X)TRUE if X is a stringisstr(field)
len(X)Character length of string Xlen(field)
like(X,"Y")TRUE if and only if X is like the SQLite pattern in Ylike(field, "addr%")
log(X,Y)Logarithm of the first argument X where the second argument Y is the base. Y defaults to 10 (base-10 logarithm)log(number,2)
lower(X)Lowercase of string Xlower(username)
ltrim(X,Y)X with the characters in Y trimmed from the left side. Y defaults to spaces and tabsltrim(" ZZZabcZZ ", " Z")
match(X,Y)TRUE if X matches the regular expression pattern Ymatch(field, "^\d{1,3}\.\d$")
max(X,…)The maximum value in a series of data X,…max(delay, mydelay)
md5(X)MD5 hash of a string value Xmd5(field)
min(X,…)The minimum value in a series of data X,…min(delay, mydelay)
mvcount(X)Number of values of Xmvcount(multifield)
mvfilter(X)Filters a multi-valued field based on the Boolean expression Xmvfilter(match(email, "net$"))
mvindex(X,Y,Z)Returns a subset of the multi-valued field X from start position (zero-based) Y to Z (optional)mvindex(multifield, 2)
mvjoin(X,Y)Joins the individual values of a multi-valued field X using string delimiter Ymvjoin(address, ";")
now()Current time as Unix timestampnow()
null()NULL value. This function takes no arguments.null()
nullif(X,Y)X if the two arguments, fields X and Y, are different. Otherwise returns NULL.nullif(fieldX, fieldY)
random()Pseudo-random number ranging from 0 to 2147483647random()
relative_time (X,Y)Unix timestamp value of relative time specifier Y applied to Unix timestamp Xrelative_time(now(),"-1d@d")
replace(X,Y,Z)A string formed by substituting string Z for every occurrence of regex string Y in string X
The example swaps the month and day numbers of a date.
replace(date, "^(\d{1,2})/(\d{1,2})/", "\2/\1/")
round(X,Y)X rounded to the number of decimal places specified by Y, or to an integer for omitted Yround(3.5)
rtrim(X,Y)X with the characters in (optional) Y trimmed from the right side. Trim spaces and tabs for unspecified Yrtrim(" ZZZZabcZZ ", " Z")
split(X,"Y")X as a multi-valued field, split by delimiter Ysplit(address, ";")
sqrt(X)Square root of Xsqrt(9) # 3
strftime(X,Y)Unix timestamp value X rendered using the format specified by Ystrftime(time, "%H:%M")
strptime(X,Y)Value of Unix timestamp X as a string parsed from format Ystrptime(timeStr, "%H:%M")
substr(X,Y,Z)Substring of X from start position (1-based) Y for (optional) Z characterssubstr("string", 1, 3) #str
time()Current time to the microsecond.time()
tonumber(X,Y)Converts input string X to a number of numerical base Y (optional, defaults to 10)tonumber("FF",16)
tostring(X,Y)Field value of X as a string.
If X is a number, it reformats it as a string. If X is a Boolean value, it reformats to “True” or “False” strings.
If X is a number, the optional second argument Y is one of:”hex”: convert X to hexadecimal,”commas”: formats X with commas and two decimal places, or”duration”: converts seconds X to readable time format HH:MM:SS.
This example returns bar=00:08:20:
| makeresults | eval bar = tostring(500, "duration")
typeof(X)String representation of the field typeThis example returns "NumberBool":
| makeresults | eval n=typeof(12) + typeof(1==2)
urldecode(X)URL X, decoded.urldecode("http%3A%2F%2Fwww.site.com%2Fview%3Fr%3Dabout")
validate(X,Y,…)For pairs of Boolean expressions X and strings Y, returns the string Y corresponding to the first expression X which evaluates to False, and defaults to NULL if all X are True.validate(isint(N), "Not an integer", N>0, "Not positive")

Statistical and Graphing Functions

Common statistical functions used with the chart, stats, and timechart commands. Field names can contain wildcards (*), so avg(*delay) might calculate the average of the delay and *delay fields.

FunctionReturn value
Usage: stats foo=… / chart bar=… / timechart t=…
avg(X)average of the values of field X
count(X)number of occurrences of the field X. To indicate a specific field value to match, format X as eval(field="desired_value").
dc(X)count of distinct values of the field X
earliest(X)latest(X)chronologically earliest/latest seen value of X
max(X)maximum value of the field X. For non-numeric values of X, compute the max using alphabetical ordering.
median(X)middle-most value of the field X
min(X)minimum value of the field X. For non-numeric values of X, compute the min using alphabetical ordering.
mode(X)most frequent value of the field X
percN(Y)N-th percentile value of the field Y. N is a non-negative integer < 100.Example: perc50(total) = 50th percentile value of the field total.
range(X)difference between the max and min values of the field X
stdev(X)sample standard deviation of the field X
stdevp(X)population standard deviation of the field X
sum(X)sum of the values of the field X
sumsq(X)sum of the squares of the values of the field X
values(X)list of all distinct values of the field X as a multi-value entry. The order of the values is alphabetical
var(X)sample variance of the field X

Index Statistics

Compute index-related statistics.

From this point onward, splunk refers to the partial or full path of the Splunk app on your device $SPLUNK_HOME/bin/splunk, such as /Applications/Splunk/bin/splunk on macOS, or, if you have performed cd and entered /Applications/Splunk/bin/, simply ./splunk.

FunctionDescription
| eventcount summarize=false index=* | dedup index | fields indexList all indexes on your Splunk instance. On the command line, use this instead:
splunk list index
| eventcount summarize=false report_size=true index=* | eval size_MB = round(size_bytes/1024/1024,2)Show the number of events in your indexes and their sizes in MB and bytes
| REST /services/data/indexes | table title currentDBSizeMBList the titles and current database sizes in MB of the indexes on your Indexers
index=_internal source=*metrics.log group=per_index_thruput series=* | eval MB = round(kb/1024,2) | timechart sum(MB) as MB by seriesQuery write amount in MB per index from metrics.log
index=_internal metrics kb series!=_* "group=per_host_thruput" | timechart fixedrange=t span=1d sum(kb) by seriesQuery write amount in KB per day per Indexer by each host
index=_internal metrics kb series!=_* "group=per_index_thruput" | timechart fixedrange=t span=1d sum(kb) by seriesQuery write amount in KB per day per Indexer by each index

Reload apps

To reload Splunk, enter the following in the address bar or command line interface.

Address barDescription
http://localhost:8000/debug/refreshReload Splunk. Replace localhost:8000 with the base URL of your Splunk Web server if you’re not running it on your local machine.
Command lineDescription
splunk _internal call /data/inputs/monitor/_reloadReload Splunk file input configuration
splunk stop
splunk enable webserver
splunk start
These three lines in succession restart Splunk.

Debug Traces

You can enable traces listed in $SPLUNK_HOME/var/log/splunk/splunkd.log.

To change trace topics permanently, go to $SPLUNK_HOME/bin/splunk/etc/log.cfg and change the trace level, for example, from INFO to DEBUG: category.TcpInputProc=DEBUG

Then

08-10-2022 05:20:18.653 -0400 INFO ServerConfig [0 MainThread] - Will generate GUID, as none found on this server.

becomes

08-10-2022 05:20:18.653 -0400 DEBUG ServerConfig [0 MainThread] - Will generate GUID, as none found on this server.

To change the trace settings only for the current instance of Splunk, go to Settings > Server Settings > Server Logging:

Filter the log channels as above.

Select your new log trace topic and click Save. This persists until you stop the server.

Configuration

The following changes Splunk settings. Where necessary, append -auth user:pass to the end of your command to authenticate with your Splunk web server credentials.

Command lineDescription
Troubleshooting
splunk btool inputs listList Splunk configurations
splunk btool checkCheck Splunk configuration syntax
Input management
splunk _internal call /data/inputs/tcp/rawList TCP inputs
splunk _internal call /data/inputs/tcp/raw -get:search sourcetype=fooRestrict listing of TCP inputs to only those with a source type of foo
License details of your current Splunk instance
splunk list licensesShow your current license
User management
splunk _internal call /authentication/providers/services/_reloadReload authentication configurations for Splunk 6.x
splunk _internal call /services/authentication/users -get:search adminSearch for all users who are admins
splunk _internal call /services/authentication/users -get:search indexes_editSee which users could edit indexes
splunk _internal call /services/authentication/users/helpdesk -method DELETEUse the remove link in the returned XML output to delete the user helpdesk

Capacity Planning

Importing large volumes of data takes much time. If you’re using Splunk in-house, the software installation of Splunk Enterprise alone requires ~2GB of disk space. You can find an excellent online calculator at splunk-sizing.appspot.com.

The essential factors to consider are:

  • Input data
    • Specify the amount of data concerned. The more data you send to Splunk Enterprise, the more time Splunk needs to index it into results that you can search, report and generate alerts on.
  • Data Retention
    • Specify how long you want to keep the data. You can only keep your imported data for a maximum length of 90 days or approximately three months.
    • Hot/Warm: short-term, in days.
    • Cold: mid-term, in weeks.
    • Archived (Frozen): long-term, in months.
  • Architecture
    • Specify the number of nodes required. The more data to ingest, the greater the number of nodes required. Adding more nodes will improve indexing throughput and search performance.
  • Storage Required
    • Specify how much space you need for hot/warm, cold, and archived data storage.
  • Storage Configuration
    • Specify the location of the storage configuration. If possible, spread each type of data across separate volumes to improve performance: hot/warm data on the fastest disk, cold data on a slower disk, and archived data on the slowest.

We hope this Splunk cheat sheet makes Splunk a more enjoyable experience for you. To download a PDF version of this Splunk cheat sheet, click here.

Frequently Asked Questions

What is the Splunk tool used for?

The purpose of Splunk is to search, analyze, and visualize (large volumes of) machine-generated data.

What are the components of Splunk?

The Indexer, Forwarder, and Search Head.
• The Indexer parses and indexes data input,
• The Forwarder sends data from an external source into Splunk, and
• The Search Head contains search, analysis, and reporting capabilities.

What are the basic commands in Splunk?

The index, search, regex, rex, eval and calculation commands, and statistical commands. Here is a list of common search commands.

How many commands are there in Splunk?

Splunk has a total 155 search commands, 101 evaluation commands, and 34 statistical commands as of Aug 11, 2022.

What are Splunk queries?

They are strings in Splunk’s Search Processing Language (SPL) to enter into Splunk’s search bar.

How do I write a Splunk query?

1. Specify your data using index=index1 or source=source2.
2. Refine your queries with keywords, parameters, and arguments. If one query feeds into the next, join them with “|” from left to right.
3. Join the strings from Steps 1 and 2 with “|” to get your final Splunk query.

How do I find a specific word in Splunk?

Any of the following helps you find the word specific in an index called index1:
• index=index1 specific
• index=index1 | search specific
• index=index1 | regex _raw=”*specific*”

How do you pull logs from Splunk?

Use index=_internal to get Splunk internal logs and index=_introspection for Introspection logs. Find the details on Splunk logs here.

CATEGORIES

Cheat Sheets

  • Splunk Cheat Sheet: Search and Query Commands (7)

    Cassandra Lee

    Cassandra is a writer, artist, musician, and technologist who makes connections across disciplines: cyber security, writing/journalism, art/design, music, mathematics, technology, education, psychology, and more. She's been a vocal advocate for girls and women in STEM since the 2010s, having written for Huffington Post, International Mathematical Olympiad 2016, and Ada Lovelace Day, and she's honored to join StationX. You can find Cassandra on LinkedIn and Linktree.

    View all posts

Splunk Cheat Sheet: Search and Query Commands (2024)

FAQs

How can I improve my Splunk query performance? ›

Splunk Query Optimization – 20 Tips for Writing Better SPL PLUS Additional Resources
  1. Filter data as early and as much as possible. ...
  2. Avoid wildcards.
  3. Use macros and subsearches instead of wildcards for list filtering.
  4. Avoid using “NOT” – because the way Splunk implements NOT is NOT the way you might expect.
Mar 6, 2018

How do you effectively search in Splunk? ›

Click Search in the App bar to start a new search. Type buttercup in the Search bar. When you type a few letters into the Search bar, the Search Assistant shows you terms in your data that match the letters that you type in. Click Search in the App bar to start a new search.

How do I search multiple keywords in Splunk? ›

We can use "AND" operator to search for logs which contains two different keywords. for example i want search for logs which contains errors for database only.So just enter "error" AND "database" and click on search.

What are the search commands in Splunk? ›

There are six broad categorizations for almost all of the search commands:
  • distributable streaming.
  • centralized streaming.
  • transforming.
  • generating.
  • orchestrating.
  • dataset processing.

What is the best practice with Splunk searches? ›

It is always best to filter in the foundation of the search if possible, so Splunk isn't grabbing all of the events and filtering them out later on. As mentioned above, using transforming commands right away also is amazing at reducing your data.

How do I optimize a search query? ›

It's vital you optimize your queries for minimum impact on database performance.
  1. Define business requirements first. ...
  2. SELECT fields instead of using SELECT * ...
  3. Avoid SELECT DISTINCT. ...
  4. Create joins with INNER JOIN (not WHERE) ...
  5. Use WHERE instead of HAVING to define filters. ...
  6. Use wildcards at the end of a phrase only.

What are the 3 modes in Splunk search? ›

Search mode has three settings: Fast, Verbose, and Smart.
  • Fast mode speeds up searches by limiting the types of data returned by the search.
  • Verbose mode returns as much event information as possible, at the expense of slower search performance.

What search techniques are most effective? ›

The answer is typically B - keywords and phrases. In most cases, you do not want to type in a long sentence or sentence fragment. Taking your search topic and translating it into the most important keywords that describe your topic is the most effective search technique.

What are some tips for effective search strategies? ›

  1. Key words. ...
  2. Use quotation marks for exact phrases. ...
  3. Boolean searching : Use + and – to narrow your search. ...
  4. Advanced search option in Google. ...
  5. Browser History. ...
  6. Searching the webpage – use Ctrl+F. ...
  7. Set a time limit then change tactics/ use different search engines. ...
  8. Evaluating websites.

How do you search multiple words at once? ›

Search for multiple items

Simply key on “OR” between the terms.

How do I search for multiple values in Splunk? ›

The syntax is simple: field IN (value1, value2, ...) Note: The IN operator must be in uppercase. You can also use a wildcard in the value list to search for similar values.

How do you search multiple things at once? ›

Use OR to broaden your search. Using OR between search terms broadens your results as any or all of your search terms can be present. It is extremely useful for finding synonyms or related concepts. Using OR enables you to carry out a number of similar searches in one go, saving you time.

What is the command to search keywords? ›

By default, you can open the search dialog by typing ctrl+shift+f . Once opened, you can type the keyword you're looking for into the text box and hit enter to search.

What are the basic search operators? ›

12 Basic search operators

The asterisk, known as a wildcard, searches for any word or phrase you include. Place OR (all caps) between two words to combine searches. Use it to search for results that have one of those words but not both. Place AND (all caps) between two words if you want your results to include both.

What are the two types of data searches you can perform in Splunk? ›

Because of this, you might hear us refer to two types of searches: Raw event searches and transforming searches.

Is Splunk difficult to learn? ›

Is Splunk Easy to Learn? The courses to learn Splunk are easily accessible online. However, it simply takes time and dedication to learn like any skill. There are many courses available online that you can take in the ease of your own home from your laptop.

How long does it take to study for Splunk? ›

It'll take nearly 7-10 days to get your hands on the fundamentals of Splunk. However, there are many SPL in Splunk which you can learn slowly by doing.

What is the common procedure to optimize a query? ›

There are two most common query optimization techniques – cost-based optimization and rule (logic) based optimization. For large databases, a cost-based query optimization technique is useful as it table join methods to deliver the required output.

What are query optimization techniques? ›

Query optimization is a process of defining the most efficient and optimal way and techniques that can be used to improve query performance based on rational use of system resources and performance metrics.

How do you optimize a large query? ›

  1. On this page.
  2. Avoid repeatedly transforming data through SQL queries.
  3. Optimize your join patterns.
  4. Use INT64 data types in joins to reduce cost and improve comparison performance.
  5. Prune partitioned queries.
  6. Avoid multiple evaluations of the same Common Table Expressions (CTEs)

What are 3 Boolean operators used in Splunk searches? ›

The Splunk search processing language (SPL) supports the Boolean operators: AND , OR , and NOT . The operators must be capitalized. The AND operator is always implied between terms, that is: web error is the same as web AND error .

What are the three main Splunk components? ›

Splunk Components. The primary components in the Splunk architecture are the forwarder, the indexer, and the search head.

What are 2 features of Splunk? ›

Following are the key features of Splunk Enterprise.
  • Collect and Index Data. Splunk collects data from virtually any source and location. ...
  • Workload Management. ...
  • Search, Analyze and Visualize. ...
  • Monitor, Alert and Report. ...
  • Machine Learning Toolkit (MLTK) ...
  • Apps and Premium Solutions.

What are the 3 search strategies? ›

Searching with keywords. Searching for exact phrases. Using truncated and wildcard searches. Searching with subject headings.

What are the 5 most commonly used search? ›

Top Search Engines
  • Google.
  • Bing.
  • Yahoo!
  • Yandex.
  • DuckDuckGo.
  • Baidu.
  • Ask.com.
  • Naver.
Feb 9, 2023

What are the 6 basic search techniques? ›

Effective Search Techniques
  • Keyword Searching. Use a keyword search to search all parts of a source for the words you enter in the search box. ...
  • Boolean Searching. ...
  • Subject Searching. ...
  • Limiters. ...
  • Phrase Searching. ...
  • Using References/Works Cited Lists.
Jan 17, 2023

What are the five steps of a search plan? ›

  • Step one: Define your research question or 'problem'.
  • Step two: choose which databases you will search. ...
  • Step three: Identify and map your key concepts. ...
  • Step four: Identify your key words. ...
  • Step five: Build your concepts and keywords into a search strategy.
Oct 23, 2017

How to search two words using grep? ›

The syntax is:
  1. Use single quotes in the pattern: grep 'pattern*' file1 file2.
  2. Next use extended regular expressions: grep -E 'pattern1|pattern2' *. py.
  3. Finally, try on older Unix shells/oses: grep -e pattern1 -e pattern2 *. pl.
  4. Another option to grep two strings: grep 'word1\|word2' input.
Oct 19, 2022

How do you separate words in a search? ›

Spaces. A space is used to separate words or operators in a search query. In a simple query where operators are not used, spaces between words are treated as an implied "and" so that the search results will contain documents containing all of the words that have been entered.

How do you search a text for specific words? ›

How to search messages on your Android phone
  1. Open the Messages app.
  2. At the top of the screen, type your search word or term in the Search images & videos field.
  3. Hit Enter to perform your search.
  4. Tap on a conversation to be taken to that particular message.
Dec 24, 2022

Which SQL command would you use to find multiple values in a query? ›

The IN operator allows you to specify multiple values in a WHERE clause. The IN operator is a shorthand for multiple OR conditions.

What command find the most common values of a given field in Splunk? ›

TOP is a Splunk command that allows you to easily find the most common values in fields. It will also help you find information behind your event values like count and percentage of the frequency.

How can I pass result of one search to another in Splunk? ›

The first query needs to go as a subsearch (the part in []) and return the needed field back to the main search (which in your case is the second query). You can select which field to use as a result in the main search with the return command. Normally it would look something like "field=value1 OR field=value2 OR ...."

Which method is better for searching across multiple objects? ›

SOSL is most useful when you don't know the exact fields and objects that your data resides in, and you need to search across multiple objects.

How do I search multiple items in sheets? ›

Find and Replace in Google Sheets

Similarly, you can also find and replace multiple values in Google Sheets. Select the range where you want to replace values (here, B2:B19), and in the Menu, go to Edit > Find and replace (or use the keyboard shortcut CTRL + H).

How do I create a search form with multiple search options? ›

How to Make a Search Form With Multiple Search Options
  1. Step 1 - List of Search Engine URLs. First of all you need to decide which search engines to include. ...
  2. Step 2 - Search Form. The code below makes up the search form. ...
  3. Step 3 - JavaScript Function. And finally, place the following javascript in the head of the page:

How do I improve SOQL performance? ›

The performance of the SOQL query improves when two or more filters used in the WHERE clause meet the mentioned conditions. The selectivity threshold is 10% of the records for the first million records and less than 5% of the records after the first million records, up to a maximum of 333,000 records.

How can direct query performance be improved? ›

Often, optimizations need to be applied directly to the data source to achieve good performance results.
  1. Optimize data source performance. ...
  2. Optimize model design. ...
  3. Optimize report designs. ...
  4. Convert to a Composite Model. ...
  5. Educate users. ...
  6. Next steps.
Jan 9, 2023

How do you optimize the runtime of a query? ›

Minimizing SQL query response times
  1. Avoid complex join and filter expressions. ...
  2. Reduce explicit or implicit data type conversions. ...
  3. Avoid using SQL expressions to transpose values. ...
  4. Avoid unnecessary outer joins. ...
  5. Make use of constraints on tables in data servers. ...
  6. Use indexes and table organization features.

How do I fix too many SOQL queries? ›

How to Resolve the “Too many SOQL queries: 101” error?
  1. Do not have DML statements or SOQL queries in our FOR loop.
  2. Use the collection to avoid SOQL inside the for loop.
  3. Bulkify Apex Trigger and follow Trigger framework to avoid the recursive issue in your code.
  4. Potentially move some business logic into @future.
Nov 21, 2022

Which two best practices should be followed when using SOQL for searching? ›

For SOQL:
  • Use selective filters, which reduce the number of rows the Query Optimizer has to scan. ...
  • When filtering on FirstName and LastName , use the Name field instead. ...
  • Avoid negative filters. ...
  • Use IN instead of a large list of OR statements. ...
  • Avoid cross-object reference formula fields.

How do I fix so many queries in SOQL? ›

Resolve the "Too many SOQL queries: 101" error

To fix the issue, change your code so that the number of SOQL fired is less than 100. If you need to change the context, you can use @future annotation which will run the code asynchronously.

What affects query performance? ›

Statistics are one of the main factors that may affect query performance because it stores analytical information about the distribution of table column values. This statistical data is used by the optimizer to estimate how many rows will return when a query is executed.

What is the reasons of poor performance of query? ›

Following are the reasons of poor performance of a query:

- Procedures and triggers without SET NOCOUNT ON. - Poorly written query with unnecessarily complicated joins. - Highly normalized database design. - Excess usage of cursors and temporary tables.

What causes a query to run slow? ›

Queries can become slow for various reasons ranging from improper index usage to bugs in the storage engine itself. However, in most cases, queries become slow because developers or MySQL database administrators neglect to monitor them and keep an eye on their performance.

How do you optimize a query with a lot of joins? ›

Follow the SQL best practices to ensure query optimization:
  1. Index all the predicates in JOIN, WHERE, ORDER BY and GROUP BY clauses. ...
  2. Avoid using functions in predicates. ...
  3. Avoid using wildcard (%) at the beginning of a predicate. ...
  4. Avoid unnecessary columns in SELECT clause. ...
  5. Use inner join, instead of outer join if possible.

Top Articles
Latest Posts
Article information

Author: Moshe Kshlerin

Last Updated:

Views: 6187

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Moshe Kshlerin

Birthday: 1994-01-25

Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697

Phone: +2424755286529

Job: District Education Designer

Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling

Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.