Creating System table with a X minutes increments

Moderator: NorbertKrupa

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Creating System table with a X minutes increments

Post by JimKnicely » Fri Aug 10, 2012 2:19 pm

Duje,

The CROSS join will allow the view to calculate more rows for you... that is, the view can return up to the number of rows in TABLES multiplied by he number of rows in COLUMNS... if you just do TABLES, than you're limited to the number of rows in it... You may not need the cross join.

I figured since you wanted 30 minute intervals across a 4 years you would need a lot of rows in the view!

For example, 2 * 24 * 356 = 17,088 thirty minute intervals per year.

So I thought you'd need a total of 17088 * 4 = 68,352 rows to cover the 4 year period.... and I doubt there are that many rows in the TABLES system table in your database :)

Plus, you may need more than 4 years in the view... I'm not sure what your requirements are.

Thanks!
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “Vertica Database Development”