# Improving Query Performance Using the Filter Parameter for Google Analytics

**URL:** <https://community.cdata.com/t/improving-query-performance-using-the-filter-parameter-for-google-analytics/853>\
**Category:** CData Virtuality \[Archived\]\
**Tags:** article, cdata-virtuality\
**Created:** [July 12, 2024, 5:15pm UTC](https://community.cdata.com/t/improving-query-performance-using-the-filter-parameter-for-google-analytics/853 "2024-07-12T17:15:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@anonymous](https://community.cdata.com/u/anonymous)\
**Post date:** [July 12, 2024, 5:15pm UTC](https://community.cdata.com/t/improving-query-performance-using-the-filter-parameter-for-google-analytics/853/1 "2024-07-12T17:15:58Z")

</div>

In some cases, query performance can be speedied up thanks to the filter parameter. In this guide, we’ll consider an example where it helped to reduce load time from 30 minutes to just one minute.

Here’s the original request:

> ```auto
> SELECT parseDate(w."date",'yyyyMMdd') AS Datum ,       w."date",       w.hour,       'WINDELBAR' AS "Reason Code" ,       w.pagePath,       w.landingPagePath,       w.exitPagePath,       w.previousPagePath,       w.nextPagePath,       CAST(entrances as integer) AS entrances,       CAST(exits as integer) AS exits,       CAST(pageviews as integer) AS pageviewsFROM (    EXEC analytics.get(        profile=>'1234567',        startDate=> '2014-01-01',        endDate=> '2014-01-07',        metrics=>'entrances,exits,pageValue,pageviews',        dimensions=>'date, hour, pagePath,landingPagePath,exitPagePath,previousPagePath,nextPagePath'    )) wWHERE w."date" != '(other)' and w.pagePath Like '%login%'
> 
> ```

To optimize query performance, we can take the filter&nbsp;w.pagePath&nbsp;Like&nbsp;‘%login%’&nbsp;and move it into a filter parameter for analytics.get:

> ```auto
> filters=>'ga:pagePath=@login;ga:date!@other'
> 
> ```

As a result, the query will take just a minute to run!
