Querying object storage takes time. What if you decided that the data looks interesting and you want to do some more analysis with a solution that will give you quicker answers? The good news is that data returned with NOS can be used as a source for CREATE TABLE statements. Assuming you have CREATE TABLE privilege, you will be able to run:
Note
This query assumes you created database Riverflow and a foreign table called riverflow in the previous step.
-- This query assumes you created database `Riverflow`
-- and a foreign table called `riverflow` in the previous step.
CREATE MULTISET TABLE riverflow_native (site_no, Flow, GageHeight, datetime)
AS (
SELECT site_no, Flow, GageHeight, datetime FROM riverflow
) WITH DATA
NO PRIMARY INDEX;
SELECT TOP 10 * FROM riverflow_native;
Result:
site_no Flow GageHeight datetime
------- ----- ---------- -------------------
9400815 .00 -.01 2018-07-10 00:30:00
9400815 .00 -.01 2018-07-10 01:00:00
9400815 .00 -.01 2018-07-10 01:15:00
9400815 .00 -.01 2018-07-10 01:30:00
9400815 .00 -.01 2018-07-10 02:00:00
9400815 .00 -.01 2018-07-10 02:15:00
9400815 .00 -.01 2018-07-10 01:45:00
9400815 .00 -.01 2018-07-10 00:45:00
9400815 .00 -.01 2018-07-10 00:15:00
9400815 .00 -.01 2018-07-10 00:00:00
This time, the SELECT query returned in less than a second. Teradata didn't have to fetch the data from NOS. Instead, it answered using data that was already on its nodes.