On Thursday, July 7, 2016 at 12:50:48 PM UTC-4, Sean Beckett wrote: > Yes, that's why I recommended it. LAST() is more performant than LIMIT 1. How > much more performant is highly dependent on your particular schema. > > > On Thu, Jul 7, 2016 at 9:32 AM, <[email protected]> wrote: > On Thursday, July 7, 2016 at 11:29:23 AM UTC-4, Sean Beckett wrote: > > > Explicitly name each field in the SELECT statement: > > > > > > SELECT LAST(<field_key_1>), LAST(<field_key_2>), LAST(<field_key_3>), > > LAST(<field_key_4>) FROM measurement > > > > > > > > > Wildcards are not yet allowed inside functions. Follow > > https://github.com/influxdata/influxdb/issues/5750 and > > https://github.com/influxdata/influxdb/issues/5978 for progress on that. > > > > > > > > > > > On Thu, Jul 7, 2016 at 9:03 AM, <[email protected]> wrote: > > > On Wednesday, July 6, 2016 at 10:22:56 AM UTC-4, Sean Beckett wrote: > > > > > > > https://docs.influxdata.com/influxdb/v0.13/query_language/functions/#last > > > > > > > > > > > > > > > > > > > > > > > > > > > > SELECT LAST(<field_key>) FROM measurement > > > > > > > > > > > > > > > > > > > > > On Wed, Jul 6, 2016 at 6:16 AM, <[email protected]> wrote: > > > > > > > My current query for this is SELECT * FROM measurement ORDER BY time DESC > > > LIMIT 1. I'm just wondering if there is a better/faster way that this > > > should be accomplished? > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > Remember to include the InfluxDB version number with all issue reports > > > > > > > > > > > > > > --- > > > > > > > > > > > > > > You received this message because you are subscribed to the Google Groups > > > "InfluxDB" group. > > > > > > > > > > > > > > To unsubscribe from this group and stop receiving emails from it, send an > > > email to [email protected]. > > > > > > > > > > > > > > To post to this group, send email to [email protected]. > > > > > > > > > > > > > > Visit this group at https://groups.google.com/group/influxdb. > > > > > > > > > > > > > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/influxdb/68d7a627-d5c4-4dbf-8755-e6bf95e14149%40googlegroups.com. > > > > > > > > > > > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > > > > > > Sean Beckett > > > > > > > Director of Support and Professional Services > > > > > > > InfluxDB > > > > > > > > > > > > That will only work one field, what if I want an entry containing multiple > > fields? > > > > > > > > > > > > -- > > > > > > Remember to include the InfluxDB version number with all issue reports > > > > > > --- > > > > > > You received this message because you are subscribed to the Google Groups > > "InfluxDB" group. > > > > > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > > > > > To post to this group, send email to [email protected]. > > > > > > Visit this group at https://groups.google.com/group/influxdb. > > > > > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/influxdb/95dc2996-024b-405a-ac23-4e1f6b2205e5%40googlegroups.com. > > > > > > > > > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > > > > > > > -- > > > > > > > > > Sean Beckett > > > Director of Support and Professional Services > > > InfluxDB > > > > So is using LAST better/faster than my originally query (order by time desc > limit 1) > > > > -- > > Remember to include the InfluxDB version number with all issue reports > > --- > > You received this message because you are subscribed to the Google Groups > "InfluxDB" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at https://groups.google.com/group/influxdb. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/influxdb/fb809db2-cda0-40ef-b4d2-07cfd5506ec7%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > > Sean Beckett > Director of Support and Professional Services > InfluxDB
Thanks. However, the only problem is that when you use LAST() on multiple fields, the Time result returned is 0, even if the LAST() from each field comes from the same entry. -- Remember to include the InfluxDB version number with all issue reports --- You received this message because you are subscribed to the Google Groups "InfluxDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/c99ef27e-2760-4927-9ce6-d591792a3684%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
