Hi all,
I have the following firewall connection data.
datetime | protocol | port | inside_ip| outside_ip
| outbound_count | outbound_bytes
-+--+---++--
--++---
2004-05-05 05:00:00 |
Hi,
| You probably don't want to do that. The DESC only applies to the
| one expression it follows. What you want is probably:
| explain select datetime,id from trafficlogs order by
| datetime desc,id desc limit 20;
This is exactly what I was after - worked a treat!
Thanks.
Darren
-
Hi All,
I have this table;
id - Serial
datetime - timestamp without timezone
with the index as
index idx_trafficlogs_datetime_id on trafficlogs using btree
(datetime,id);
When performing the following query:
explain select datetime,id from trafficlogs order by datetime,id limit
20;
Hi,
Thanks for the several replies both on and off the list.
To be more specific, I am wanting to aggregate data to a 5/10/15 min
interval. Currently, I am aggregating data that falls in hour / day /
month / year periods for both count() and sum(). The sql I am currently
using is:
SELECT count(
Hi All,
I am wanting to perform the equivalent of date_trunc to 5/10/15 minute
intervals. As this does mnot seem to be natively supported by
date_trunc, can anyone point me in the right direction to possible write
the SQL ro acheive the desired outcome?
Tia,
Darren
---(e