ize DB.
>
> Thanks,
> Andrew S.
>
> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org
> [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of R Smith
> Sent: Thursday, November 19, 2015 7:40 AM
> To: sqlite-users at mailinglis
On 2015/11/19 4:49 PM, Andrew Stewart wrote:
> Hi,
> Had a question regarding what I am trying to do. One thing that I have
> noticed is that it is slow to do this. I do not have any indexes created and
> there is no primary index on this table.
> I am using a 'DateTime' variable
On 19 Nov 2015, at 4:32pm, Eric Rubin-Smith wrote:
> To be pedantic, an integer can take up to 9 bytes.
> https://www.sqlite.org/fileformat.html#varint
Heh. I took my '8 bytes' from section 2.1 of the same document.
Simon.
On 19 Nov 2015, at 4:06pm, Andrew Stewart wrote:
>Would storing the dateTime as Integer make the database and indexes
> smaller?
Yes. An integer will take a maximum of 8 bytes to store. A string's storage
needs at least one byte per character in the string. And the format you're
u
-bounces at mailinglists.sqlite.org
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of R Smith
Sent: Thursday, November 19, 2015 7:40 AM
To: sqlite-users at mailinglists.sqlite.org
Subject: Re: [sqlite] 10 minute Avg
On 2015/11/19 4:49 PM, Andrew Stewart wrote:
> Hi,
>
> On 19 Nov 2015, at 2:49pm, Andrew Stewart
> wrote:
>
> Had a question regarding what I am trying to do. One thing that I have
> noticed is that it is slow to do this. I do not have any indexes created and
> there is no primary index on this table.
I bet whatever you're doing, a wel
).
Thanks,
Andrew S.
-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of R Smith
Sent: Wednesday, November 18, 2015 2:06 PM
To: sqlite-users at mailinglists.sqlite.org
Subject: Re: [sqlite] 10 minute Avg
On Thu, Nov 19, 2015 at 11:26 AM, Simon Slavin wrote:
>
> On 19 Nov 2015, at 4:06pm, Andrew Stewart
> wrote:
>
> >Would storing the dateTime as Integer make the database and
> indexes smaller?
>
> Yes. An integer will take a maximum of 8 bytes to store. A string's
> storage needs at le
m, TIV.startTime ASC
;
See if that does what is needed,
Cheers!
Ryan
>
> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org
> [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of R Smith
> Sent: Wednesday, November 18, 2015 10:06 AM
> To:
Slight alteration, the Left Join should contain the full filter to show
empty time-slots, if that is what you want rather, like this:
WITH BDT(startDateTime,endDateTime,IntervalSeconds) AS (
SELECT '2015-11-17 00:00:00', '2015-11-18 00:00:00', '+600 seconds'
), TIV(startTime,endTime) AS (
Quite easy to do with a CTE, like this:
WITH BDT(startDateTime,endDateTime,IntervalSeconds) AS (
SELECT '2015-11-17 00:00:00', '2015-11-18 00:00:00', '+600 seconds'
), TIV(startTime,endTime) AS (
SELECT startDateTime, datetime(startDateTime,IntervalSeconds) FROM BDT
UNION ALL
SELEC
s at mailinglists.sqlite.org
Subject: Re: [sqlite] 10 minute Avg
Slight alteration, the Left Join should contain the full filter to show empty
time-slots, if that is what you want rather, like this:
WITH BDT(startDateTime,endDateTime,IntervalSeconds) AS (
SELECT '2015-11-17 00:00:00', '
On 18 Nov 2015 at 16:52, Andrew Stewart wrote:
> Hi Richard,
> I figured out what you did. Not exactly what I am after. College had a
> suggestion. I am going to work on adjusting the structure to storing
> time/date as BIGINT and do the math on that. I need to be able to adjust the
>
list'
Subject: Re: [sqlite] 10 minute Avg
Hi Richard,
That gave me 10 hour intervals not 10 minute. Which is the part that
controls the frequency?
Thanks,
Andrew S.
-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org
[mailto:sqlite-
Sent: Wednesday, November 18, 2015 8:41 AM
To: SQLite mailing list
Subject: Re: [sqlite] 10 minute Avg
On 11/18/15, Andrew Stewart wrote:
> Hi,
> I am trying to generate 10 minute average data for a
> day from a data set. Table is created by the following:
>
&g
Hi,
I am trying to generate 10 minute average data for a day from a
data set. Table is created by the following:
CREATE TABLE dataStreamRecord (fwParameterID INTEGER NOT NULL, dateTime
DATETIME NOT NULL, data INTEGER NOT NULL);
Sample Data
fwParameterID,dateTime,data
1074,2015-
On 11/18/15, Andrew Stewart wrote:
> Hi,
> I am trying to generate 10 minute average data for a day
> from a data set. Table is created by the following:
>
> CREATE TABLE dataStreamRecord (fwParameterID INTEGER NOT NULL, dateTime
> DATETIME NOT NULL, data INTEGER NOT NULL);
>
> Sa
17 matches
Mail list logo