You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/dune-v2/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Dune V2 is an update to our database and query engine that includes:
10
10
1. A scalable column oriented database (in contrast to PostgreSQL’s row oriented approach)
11
11
2. Dune’s new query engines, Dune SQL and [Spark SQL](https://spark.apache.org/docs/latest/sql-programming-guide.html).
12
12
13
-
For more on the why behind Dune V2, be sure to read the post from our CTO (to be published in the coming weeks)!
13
+
For more on the why behind Dune V2, be sure to [read the post from our CTO](https://dune.com/blog/introducing-dune-sql)!
14
14
15
15
## New Database
16
16
@@ -67,6 +67,6 @@ Both also have well documented index of built in functions on their website:
67
67
*[Spark - Spark SQL Language Reference](https://spark.apache.org/docs/latest/sql-programming-guide.html)
68
68
*[Trino - Functions and Operators](https://trino.io/docs/current/functions.html)
69
69
70
-
Our #dune-sql Discord channel is the best place to get help from our team and Wizard community when Google fails you.
70
+
Our [#dune-sql Discord channel](https://discord.com/channels/757637422384283659/1051871389432422491) is the best place to get help from our team and Wizard community when Google fails you.
71
71
72
72
As you come across issues or identify areas of improvement, please send us an email at [[email protected]](mailto:[email protected]) and we’ll work with you to update and optimize!
Copy file name to clipboardExpand all lines: docs/reference/dune-v2/query-engine.md
+44-4Lines changed: 44 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,53 @@ With Dune V2 we’re moving away from a [PostgreSQL](https://www.postgresql.org/
10
10
1. Spark SQL - [Apache Spark](https://www.databricks.com/glossary/what-is-apache-spark) hosted on [Databricks](https://docs.databricks.com/getting-started/introduction/index.html).
11
11
2. Dune SQL - A self hosted instance of [Trino](https://trino.io/)(**currently in alpha**).
12
12
13
+
As Dune usage has increased, our data access pattern has become quite clear: Dune writes data Once and wizard query it millions of times.
14
+
15
+
In order to scale Dune to meet the demand for query execution, we need to decouple data storage from the computation of queries - something that can’t be done in PostgreSQL.
16
+
17
+
As we experimented with solutions internally, we built a new system around the [Delta framework](https://delta.io/) and used Spark for parallel processing of that data.
18
+
19
+
During experimentation, we began ingesting Solana data. Since solana.transactions is about 100x the size of ethereum.transactions, it was both a primary reason we needed to upgrade our systems (there’s no way Postgres could handle this) and the perfect test candidate.
20
+
21
+
We saw some great wins in how quickly and flexibly we could write and store data but when it came time to start sharing access to Solana data we faced a dilemma.
22
+
23
+
As we were focused on optimizing the ingesting and storing of this data, we did not spend a lot of time upgrading our infrastructure for querying that data.
24
+
25
+
When we asked ourselves whether we should spend months figuring out how to improve our querying infrastructure or get Solana data in the hands of our community ASAP, we chose the latter - which meant shipping Dune V2 in beta with Spark SQL as our query engine.
26
+
27
+
Now that we have a massive amount of usage data (compared to our internal testing), cracks have appeared that weren’t evident to us pre-launch.
28
+
29
+
As things stand:
30
+
31
+
* A range of queries that performed super well on v1, now take minutes on V2 (looking at you WHERE tx_hash = y). Part of this is clearly the tradeoff we’ve made in laying out our data in columnar form, as opposed to in rows, but that doesn’t fully explain the latency.
32
+
* V2 (Beta) lacks support for user defined functions, views, tables, and it’s not easy for Dune to enable that functionality in a way that’s safe and helpful to users in Spark.
33
+
* Because the Spark clusters are outsourced, we have trouble scaling them, and tuning them. It’s also not possible for us to improve performance or fix bugs without waiting for months for someone to [merge them](https://github.com/delta-io/delta/pull/1210).
34
+
* We oftentimes find ourselves without visibility into the health of the query engine, which has lead to us being unable to resolve confusion for ourselves or the community when some queries have failed.
35
+
36
+
As a result of these challenges, we’ve been internally researching how to fundamentally improve our V2 query experience and after a few breakthroughs, we’ve developed what Dune SQL, powered by a self-hosted instance of [Trino](https://trino.io/).
37
+
38
+
And as a step toward resolving some of the communication errors we made with the initial Spark SQL launch, we’re emphasizing that **Dune SQL is currently in alpha**.
39
+
40
+
This means:
41
+
42
+
* While we strongly believe Dune SQL/Trino is the long term solution for creating the best blockchain data querying experience in the world, it isn’t there yet - with your help we’ll break lots of things and use what we learn to continuously build a better system.
43
+
* While we have a timeline for [Sunsetting Dune V1 (PostgreSQL)](../v1-sunsetting.md), we do not have one for fully transitioning from Spark to Dune SQL and will work with the community to decide when and how that transition will take place to move forward with [Speed](https://www.notion.so/Values-and-working-at-Dune-7efdcec2298a4913aaef8067b25820df#ffc480bf5c5e4e38a1c53d2fb9926e3e) and transparency.
44
+
45
+
## Joining the SQL revolution
46
+
47
+
We’re excited to have you join the SQL revolution with us as we make Dune SQL the absolute best blockchain querying experience around.
48
+
49
+
To help out as an alpha tester, you’ll first need to create a separate account at [https://dev.dune.com/](https://dev.dune.com/).
50
+
51
+
There you’ll find Dune SQL as an option in the Query Explorer, and right off the bat you should see some improvements over Spark SQL ([incomplete & cryptic error messages](https://dev.dune.com/queries/59553) or [0x strings](https://dev.dune.com/queries/59390), we’re looking at you).
52
+
13
53
## Syntax and operator differences
14
54
15
55
The syntax and keyword operator differences between Postgres, Spark, and Dune SQL are quite minimal, however there are a few to be aware of.
16
56
17
57
!!! warning
18
58
**Dune SQL is still in alpha!** If you find any other changes in Spark or Dune SQL that are important to note, please feel free to [submit a PR to this docs page on GitHub](https://github.com/duneanalytics/docs/edit/master/docs/reference/dune-v2/query-engine.md) or let us know in #dune-sql.
[Here is an example query](https://dune.com/queries/1746224) which queries [this query](https://dune.com/queries/1746191).
61
99
The `queryId` is part of the URL of a query.
62
100
63
-
Limitations:
101
+
**Note**:
102
+
64
103
- All output columns of the query being queried must be named. That is, you cannot query `select 1` or `select count(*) from ethereum.transactions`, but you can query `select 1 as v` and `select count(*) as total from ethereum.transactions`.
65
104
- Parametrized queries are not supported.
66
105
- Only public queries can be queried. Support for querying private queries will be added in the future.
67
106
- Only saved queries can be queried.
68
107
- Only queries written in Dune SQL can be queried.
69
108
70
-
71
109
## Other questions and feedback
72
110
73
111
As ever, Google is a great friend in answering your SQL questions.
@@ -79,4 +117,6 @@ Both also have well documented index of built in functions on their website:
79
117
*[Spark - Spark SQL Language Reference](https://spark.apache.org/docs/latest/sql-programming-guide.html)
80
118
*[Trino - Functions and Operators](https://trino.io/docs/current/functions.html)
81
119
120
+
Our [#dune-sql Discord channel](https://discord.com/channels/757637422384283659/1051871389432422491) is the best place to get help from our team and Wizard community when Google fails you.
121
+
82
122
As you come across issues or identify areas of improvement, please send us an email at [[email protected]](mailto:[email protected]) and we’ll work with you to update and optimize!
Copy file name to clipboardExpand all lines: docs/reference/tables/available-chains.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,4 +185,10 @@ Working with the C-Chain on Dune works exactly like querying Ethereum mainnet da
185
185
186
186
Created in September 2018 during ETHBerlin, [Goerli Testnet](https://goerli.net/) was the first proof-of-authority cross-client testnet, synching Parity Ethereum, Geth, Nethermind, Hyperledger Besu (formerly Pantheon), and EthereumJS.
187
187
188
-
This is the perfect solution for dapp developers looking to get stats before you launch on mainnet!
188
+
This is the perfect solution for dapp developers looking to get stats before you launch on mainnet!
189
+
190
+
## Fantom
191
+
192
+
[Fantom](https://fantom.foundation/) is a layer 1 blockchain offering smart contract functionality.
193
+
194
+
It uses a Directed Acyclic Graph, which involves the seamless interaction of nodes in the network to ensure fast and secure transactions.
0 commit comments