Pay per Compute Query Costs

Pricing

When you use Space and Time, all you pay for is compute. Storage, indexed blockchain data, OpenAI dashboards, OLTP + OLAP queries in your cluster, Proof of SQL cryptography, and more are always included.

We offer several different pricing options to fit your needs and your use case. Visit our pricing page to learn more about which option is best for you.

About Pay per Compute

Pay per Compute is Space and Time's usage-based pricing option that lets you pay only for the queries you run. Compute costs are calculated using a gas-like model where compute consumption is measured in Space and Time Credits. The amount of compute consumed depends on the exact query, the size of data, and how much data is returned.

To give you an idea of what different queries will cost under the Pay per Compute model, we've provided a set of queries against various public_read tables along with their tested consumption of Credits.

Currently, the cost of 1 compute credit = 1 USD.

🚧

Note About Beta

Please note that Pay per Compute is in beta, and the estimates below may change over time. You can always come back to this page to see the latest estimates.

As a general observation: Large tables are partitioned by the Time_Stamp field, meaning time-bounded queries will consume far fewer resources than unbounded queries (aka, full table scan) as long as you operate on the unmodified Time_Stamp field, as seen in examples below.

If you need to run frequent queries on all, unbounded history (i.e., getting entire history of an address), you might consider creating a materialized view.


Single-Row Table Look Up

SELECT * FROM sxtlabs.singularity
Wall-Clock TimeCredits
93ms0.000037125

Multiple-Row Look Up

SELECT * FROM sxtdemo.stocks WHERE STOCK_DATE = '2023-11-21'
Wall-Clock TimeCredits
94ms0.000621000

Simple Analytic

SELECT SYMBOL, AVG((STOCK_HIGH-STOCK_LOW) / STOCK_OPEN) AS Avg_Volatility FROM sxtdemo.stocks WHERE SYMBOL in ('MSFT','AMZN','GOOGL') GROUP BY SYMBOL
Wall-Clock TimeCredits
748ms0.008040050

Simple Analytic, Large Scan

SELECT cast(TIME_STAMP AS date) AS Create_Date, count(*) AS Contracts_Created FROM POLYGON.CONTRACTS WHERE TIME_STAMP BETWEEN '2023-01-01' AND '2023-04-30' -- 200k of 2M ROWS, 10% GROUP BY 1 ORDER BY 1 desc
Wall-Clock TimeCredits
5s0.222452000

Medium Analytic

SELECT avg(Block_Count) AS DailyAvg_Block_Count ,avg(Validator_Reward_Matic) AS DailyAvg_Validator_Reward_Matic ,avg(Gas_Used_Matic) AS DailyAvg_Gas_Used_Matic ,round(avg(Avg_Txn_per_Block),2) AS DailyAvg_Txn_per_Block FROM ( SELECT cast(TIME_STAMP AS date) AS Block_Date ,sum(REWARD)/1e18 AS Validator_Reward_Matic ,sum(GAS_USED)/1e18 AS Gas_Used_Matic ,AVG(TRANSACTION_COUNT) AS Avg_Txn_per_Block ,count(*) AS Block_Count FROM POLYGON.BLOCKS WHERE TIME_STAMP BETWEEN '2023-01-01' AND '2023-01-26' -- 1M ROWS GROUP BY 1 ) AS a
Wall-Clock TimeCredits
2s0.058209900

Large Analytic

Query the entire EVENT.LOG table (every smart contract event ever fired - the single largest table of any model) across 3 different chains.

SELECT p.Event_Date ,p.Event_Cnt AS Polygon_Event_Count ,p.Event_Cnt - lead(p.Event_Cnt) over(ORDER BY p.Event_Date desc) AS Polygon_Event_Growth ,round((1-(lead(p.Event_Cnt)over(ORDER BY p.Event_Date desc) / p.Event_Cnt))*100,2)||'%' AS Polygon_Event_Growth_Pct ,e.Event_Cnt AS Ethereum_Event_Count ,e.Event_Cnt - lead(e.Event_Cnt) over(ORDER BY e.Event_Date desc) AS Ethereum_Event_Growth ,round((1-(lead(e.Event_Cnt)over(ORDER BY e.Event_Date desc) / e.Event_Cnt))*100,2)||'%' AS Ethereum_Event_Growth_Pct ,s.Event_Cnt AS Sui_Event_Count ,s.Event_Cnt - lead(s.Event_Cnt) over(ORDER BY s.Event_Date desc) AS Sui_Event_Growth ,round((1-(lead(s.Event_Cnt)over(ORDER BY s.Event_Date desc) / s.Event_Cnt))*100,2)||'%' AS Sui_Event_Growth_Pct FROM ( SELECT CAST(p1.TIME_STAMP AS date) AS Event_Date ,count(*) AS Event_Cnt FROM POLYGON.LOGS AS p1 WHERE p1.TIME_STAMP BETWEEN '2023-08-01' AND '2023-08-31T23:59:59' GROUP BY 1 ) AS p LEFT OUTER JOIN ( SELECT CAST(e1.TIME_STAMP AS date) AS Event_Date ,count(*) AS Event_Cnt FROM ETHEREUM.LOGS e1 WHERE e1.TIME_STAMP BETWEEN '2023-08-01' AND '2023-08-31T23:59:59' GROUP BY 1 ) AS e ON p.Event_Date = e.Event_Date LEFT OUTER JOIN ( SELECT CAST(s1.TIME_STAMP AS date) AS Event_Date ,count(*) AS Event_Cnt FROM SUI.EVENTS AS s1 WHERE s1.TIME_STAMP BETWEEN '2023-08-01' AND '2023-08-31T23:59:59' GROUP BY 1 ) AS s ON p.Event_Date = s.Event_Date
Wall-Clock TimeCredits
10s0.528942400

Did this page help you?