mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
add query optimizations from um-13
This commit is contained in:
parent
9803d4b5ee
commit
0b7db02103
2 changed files with 16 additions and 12 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { getDateQuery, getFilterQuery, rawQuery } from 'lib/queries';
|
||||
import { getDateQuery, getDateStringQuery, getFilterQuery, rawQuery } from 'lib/queries';
|
||||
|
||||
export function getEventMetrics(
|
||||
website_id,
|
||||
|
|
@ -14,7 +14,7 @@ export function getEventMetrics(
|
|||
`
|
||||
select
|
||||
event_value x,
|
||||
${getDateQuery('created_at', unit, timezone)} t,
|
||||
${getDateStringQuery(getDateQuery('created_at', unit, timezone), unit)} t,
|
||||
count(*) y
|
||||
from event
|
||||
where website_id=$1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue