Help:Querying for queries

Jump to: navigation, search
SMW user manual
Properties and types
Special properties
Inverse properties
Custom units

Semantic templates

Service links

Browsing interfaces
Semantic search
Selecting pages
Strict comparators
Displaying information
Result formats
Inline queries
Querying for queries
Using the API
Semantic Web
RDF export

Importing vocabulary

SMW admin manual
Table of Contents


This help page describes how to query for information about inline queries. This is possible since Semantic MediaWiki 1.8.0 which introduced a mechanism to the parser functions #ask, #show followed by #concept1 in Semantic MediaWiki 2.5.0 that automatically stores information for the page they are used on as a subobject. This information includes the depth, the format, the size and the string of the respective query. Starting with with Semantic MediaWiki 1.9.0 the duration2 was added and Semantic MediaWiki 2.5.0 brought information about it's parameters3.

This data can be queried as usual, e.g., to find out how many queries on the wiki use a particular format, or what are the largest queries.


The total number of queries
[[Query size::+]]

Result: 8141

The total number of pages containing queries
[[Has query::+]]

Result: 2449

The number of queries that use the format "count"
[[Query format::count]]

Result: 2412

The number of pages that use queries that use the format "list"
[[Has query.Query format::list]]

Result: 1510

Pages that have a query with format "ul" and one with format "table"
[[Has query.Query format::ul]]
[[Has query.Query format::table]]


The 10 largest queries used on the wiki with their size and duration
[[Has query::+]]
|?Query size
|?Query duration
|sort=Query duration


Querying for the query duration is not enabled for this wiki.

The 10 largest queries used on the wiki with their size and query string
[[Query string::+]]
|?Query size
|?Query string
|sort=Query size


 Query size
"Query size" is a predefined property that collects the number of conditions used in a query and is provided by Semantic MediaWiki.
Query string
"Query string" is a predefined property that describes the conditions of the query as a string and is provided by Semantic MediaWiki.
<q>[[Docinfo language::fr]] [[Docinfo status::!obsolete]] [[Warning::Master page updated]] OR [[Docinfo progress::≤100]] [[Docinfo language::fr]] [[Docinfo status::!obsolete]]</q>
Yury Katkov/docinfo12
<q>[[Docinfo language::ru]] [[Docinfo status::!obsolete]] [[Warning::Master page updated]] OR [[Docinfo progress::≤100]] [[Docinfo language::ru]] [[Docinfo status::!obsolete]]</q>
<q>[[Docinfo language::de]] [[Docinfo status::!obsolete]] [[Warning::Master page updated]] OR [[Docinfo progress::<<100]] [[Docinfo language::de]] [[Docinfo status::!obsolete]]</q>
<q>[[Docinfo language::zh-hans]] [[Docinfo status::!obsolete]] [[Warning::Master page updated]] OR [[Docinfo progress::<<100]] [[Docinfo language::zh-hans]] [[Docinfo status::!obsolete]]</q>
Yury Katkov12
<q>[[Docinfo language::ru]] [[Docinfo status::!obsolete]] [[Warning::Master page updated]] OR [[Docinfo progress::≤100]] [[Docinfo language::ru]] [[Docinfo status::!obsolete]]</q>
[[Category:Result formats]] [[Has maximum version::still supported]] [[Has component::Semantic Result Formats]] [[Docinfo status::effective]] [[Docinfo language::en]] [[Has further requirements::GraphViz]]
Help:Configuration parameter "$smwgPageSpecialProperties"11
[[Category:Special properties]] [[Has maximum version::still in use]] [[Is optional special property::true]] [[Has special property focus::page information]] [[Docinfo status::effective]] [[Docinfo language::en]]
Help:Special property "Has query"11
[[Category:Special properties]] [[Has special property name::!Has query]] [[Has maximum version::still in use]] [[Has special property focus::query information]] [[Docinfo status::effective]] [[Docinfo language::en]]
Ergebnisformate (Mathe)9
[[Category:Result formats]] [[Has maximum version::aktuell unterstützt]] [[Has category::Mathe]] [[Docinfo status::effective]] [[Docinfo language::de]]
Math related result formats9
[[Category:Result formats]] [[Has maximum version::still supported]] [[Has category::math]] [[Docinfo status::effective]] [[Docinfo language::en]]
... further results

This documentation page applies to all SMW versions from 1.9.0 to the most current version.

Help:Querying for queries en 1.9.0