QuestDB
Author: n | 2025-04-24
QuestDB is a high performance, open-source, time-series database - Releases questdb/questdb. QuestDB is a high performance, open-source, time-series database - questdb/questdb. Skip to content. Download, upgrade or Download. QuestDB 7.2 Release. QuestDB. J. Tags: release; open source; questdb; QuestDB 7.2 release overview. In QuestDB 7.2, we introduce implicit variable-size time
GitHub - questdb/questdb: QuestDB is a high
Var _jq = []; var $ = function(fn) { _jq.push(fn); }; --> Support Ukraine in Her Fight for Freedom! --> Accessing the QuestDB database can be fast and seamless by using the Open Database Connectivity (ODBC) solution. Providing full interoperability, the ODBC driver for QuestDB allows you to access live QuestDB data directly from DBArtisan. It enables you to retrieve data to DBArtisan, and review and modify these data right in this application.QuestDB Key FeaturesOpen sourceLow memory leakage problemSupport for multiple table typesPlatform IndependentDBArtisan Key Features Database administrationSQL development and debuggingSchema comparison and synchronizationPerformance monitoring and tuningDirect ConnectionOur data connector enables various ODBC-aware applications to establish a direct connection to QuestDB via TCP/IP to eliminate the need for a QuestDB client. A direct connection increases the speed of data transmission between DBArtisan and QuestDB for real-time analytics. It streamlines the deployment process since there is no need to distribute any additional client-side software with the ODBC driver for QuestDB.What are some reasons to choose Devart ODBC Driver for QuestDB?IntegrationODBC Driver for QuestDB is compatible with DBArtisan allowing extraction of data by executing SQL statements.Platforms VarietyODBC Driver for QuestDB can be used with 32-bit and 64-bit applications on both x32 and x64 platforms, so there is no need to additionally configure the driver, applications, or environment.Fully Unicode-Compliant DriverWith our fully Unicode-compliant driver, you can properly retrieve and modify any data in multilingual QuestDB databases, regardless of their character set: Latin, Cyrillic, Hebrew, Chinese, etc., and in any language environment.How to download,
GitHub - questdb/questdb: QuestDB is a high performance, open
Following commands.To install the devartodbcquestdb_i386.deb on a 32-bit system, use:use sudo dpkg -i devartodbcquestdb_i386.debTo install the devartodbcquestdb_amd64.deb on a 64-bit system, use:sudo dpkg -i devartodbcquestdb_amd64.debFor more detailed information about installing and configuring ODBC Driver for QuestDB on Ubuntu, go to the documentation.To install the devart-odbc-questdb.i386.rpm on a 32-bit system, use:sudo -rpm -ivh devart-odbc-questdb.i386.rpmTo install the devart-odbc-questdb.x86_64.rpm on a 64-bit system, use:sudo rpm -ivh devart-odbc-questdb.x86_64.rpmFor more detailed information about installing and configuring ODBC Driver for QuestDB on Centos, go to the documentation.Connect DBArtisan to QuestDB data source and access data in 3 simple steps01. Install the driver and configure the ODBC data source. Start DBArtisan and in the tab panel select Datasource > dfRegister Datasource.02. In the appeared window, select Generic ODBC. Then, enter connection information in each step by clicking Next. In the end, click Finish.03.In the Datasource Navigator, double-click the needed database, and select Tables. Right-click the table and select Schema to view the data.Advantages of Connectivity to QuestDB from DBArtisan via ODBC DriverSecure ConnectionEvery operation with QuestDB becomes significantly faster using such capabilities of ourdriver as local data caching, connection pooling, and much more.Working with DBArtisan using Multiple FunctionsUsing DBArtisan, you can create tables, add data, select, delete, sort, edit, combine data from several database tables, and find unique values quickly and easily.ODBC ConformanceThe driver fully supports the ODBC interface, its data types, and functions. It offers advanced connection string parameters and allows any ODBC-compliant desktop or web application to connect to QuestDB from DBArtisan on various platforms.Simplequestdb/questdb-quickstart: quickstart to work with questdb - GitHub
To disable the TSBS loader's flow control. This allowedus to use a simpler loader implementation for the QuestDB module. You can checkthe changes here.That's what we got with the no-op server:$ ./tsbs_load_questdb --file /tmp/data --workers 4time,per. metric/s,metric total,overall metric/s,per. row/s,row total,overall row/s1684331599,43206635.89,4.321000E+08,43206635.89,4320663.59,4.321000E+07,4320663.59Summary:loaded 691200000 metrics in 16.064sec with 4 workers (mean rate 43029061.31 metrics/sec)loaded 69120000 rows in 16.064sec with 4 workers (mean rate 4302906.13 rows/sec)Yes, that's one more jump, from 2.86M to 4.3M rows/s. Again, we're happy withthe TSBS performance, at least for the nearest future.Our TSBS optimization story is over, but we haven't explained why we ended withour own TSBS fork. It's time to fix that.To fork, or not to fork, that is the questionAs you may have noticed, thepull request we mentioned beforeis still pending. Same story with abugfix around query generation wecreated recently. Of course, we're not alone - at the time of writing, there are25 pending PRs open against the TSBS repo.Since it's an open-source project, it's totally fine. Since it's an open-sourceproject with a permissive license, we can easily fix the problem by forking it.That's precisely what we did.So far, our fork includes the above-mentioned optimizations and the bug fix. Wealso merged InfluxDB v2 support patchsince we wanted to be able to run the benchmarks for this database.We're also open to any contributions and promise to maintain our TSBS forkactively. If you have a patch you want to see in TSBS, don't hesitate to open aPR.As usual, we encourage you to try the latest QuestDB release and share yourfeedback with our Community Forum. You can alsoplay with our live demo to see how fast it executesyour queries. And, of course, contributions to our open-sourcedatabase on GitHub are more than welcome.. QuestDB is a high performance, open-source, time-series database - Releases questdb/questdb. QuestDB is a high performance, open-source, time-series database - questdb/questdb. Skip to content. Download, upgrade orquestdb/questdb-quickstart: quickstart to work with
QuestDB time zone database uses the English locale but supportfor additional locales may be added in future. Referring to time zones which areoutdated or not recognized results in a invalid timezone name error. Thefollowing resources may be used for hints how to refer to time zones by ID oroffset:The official list maintained by IANAJava'sgetAvailableZoneIdsmethodWiki entry on tz database time zones(this is a convenient reference, but may not be 100% accurate)noteUsers should be aware that the time zone database contains both current andhistoric transitions for various time zones. Therefore time zone conversionsmust take the historic time zone transitions into account based on the timestampvalues.Updates to the time zone databaseThe upstream project updates past time zones as new information becomesavailable. These changes are typically related to daylight saving time (DST)start and end date transitions and, on rare occasions, time zone name changes.The tz database version used by QuestDB is determined by the JDK version used atbuild time and therefore updates to the time zone database are directlyinfluenced by this JDK version. To find the JDK version used by a QuestDB build,run the following SQL:buildBuild Information: QuestDB 7.4.0, JDK 11.0.8, Commit Hash b9776a8a09f7db35955530bff64de488a029f1ceConverting timestamps to and from time zonesFor convenience, QuestDB includes two functions for time zone conversions ontimestamp values.to_timezone()to_utc()These functions are used to convert a Unix timestamp, or a string equivalentcast to timestamp as follows:SELECT to_timezone(1623167145000000, 'Europe/Berlin');to_timezone2021-06-08T17:45:45.000000ZSELECT to_utc(1623167145000000, 'Europe/Berlin');to_utc2021-06-08T13:45:45.000000ZUsing UTC offset for conversionsThe to_timezone() andto_utc() functions may use UTCoffset for converting timestamp values. In some cases, this can be more reliablethan string or time zone ID conversion given historic changes to time zone namesor transitions. The following example takes a Unix timestamp in microseconds andconverts it to a time zone +2 hours offset from UTC:SELECT to_timezone(1213086329000000, '+02:00');to_timezone2008-06-10T10:25:29.000000ZSELECT to_utc('2008-06-10T10:25:29.000000Z', '+02:00');to_timezone2008-06-10T08:25:29.000000ZQuestDB 8.1.2 Release - QuestDB Community
High performanceLow-latencySIMD-optimized queriesIngest 4M rows/s per nodeSee benchmarksFor developersOpen sourceFastest growing TSDBSQL & PGwire compatibleSee live demoOpen formatsHistorical data in ParquetMultiple availability zonesDecouple storage/computeSee EnterpriseQuestDB leaps your team forwardLeadership through open formatsGlobally distributed, hyper-fast next generation databaseOpen formatsLeverages existing open formats. No vendor lock-in.Apache ParquetEnhanced compression and encoding, for ingress or egress.Super read/writeFast ingest and low latency SQL queriesFull streamStream market data in from feeds or sensors, apply Parquet on readDirect to Parquet?Bypass QuestDB ingest, query Parquet directly from the object storeVersatile ecosystemDiverse clients connect to your data, app, AI and ML frameworksUse QuestDB with the tools you loveSimple, high performance SQLEasily adopted, time-series optimized SQLArrow up iconSELECT timestamp, symbol, priceFROM tradesWHERE timestamp IN '2024-06-21;1M';SELECT timestamp, symbol, priceFROM tradesWHERE timestamp IN '2024-06-21;1M';SELECT timestamp, symbol, avg(price)FROM tradesSAMPLE BY 5m FILL(LINEAR);SELECT timestamp, symbol, avg(price)FROM tradesSAMPLE BY 5m FILL(LINEAR);SELECT timestamp, symbol, priceFROM tradesLATEST ON timestamp PARTITION BY symbol;SELECT timestamp, symbol, priceFROM tradesLATEST ON timestamp PARTITION BY symbol;SELECT timestamp, bid_price, ask_priceFROM bidsASOF JOIN asks;SELECT timestamp, bid_price, ask_priceFROM bidsASOF JOIN asks;Arrow up iconFilter and search for specific timestamps with "WHERE"Create time buckets and aggregate by intervals with "SAMPLE BY"Search time series from most recent values to oldest with "LATEST ON"Join two tables based on timestamp where timestamps do not exactly match with "ASOF JOIN"Community love for QuestDBCategory user reviews on G2 rate QuestDB with the highest user satisfaction. Visit our vibrant Slack to chat with the community, the QuestDB core developers, and our technical AI-bot, to find out why.QuestDB is a time series database truly built by developers for developers. We found that QuestDB provides a unicorn solution to handle extreme TPS while also offering a simplified SQL programming interface.The next generation has arrivedUpgrade to QuestDBHyper ingestion, millisecond queries, and powerful SQL.Lower bills through peak efficiency.GitHub - questdb/questdb-quickstart: quickstart to work with
QuestDB is the world's fastest growing time-series database. It offers top ingestion throughput, enhanced SQL analytics, and cost-saving hardware efficiency. It's open source and integrates with many tools and languages.The Time-Series Benchmark Suite, or TSBS,is a well-known benchmarking tool for anyone who's intotime-series databases. While not ideal, justlike any other benchmark, it does a decent job representing common workloads fora time-series database.Timescale created TSBS based on anotherbenchmark tool from theInfluxDB team. Here at QuestDB, we've been using TSBS to measure and optimizeingestion and query performance for a few years already. Today we'd like tointroduce our own TSBS fork, share the story of the optimization we made, andexplain why we ended with a fork instead of contributing to the upstream repo(spoiler: we did that too).In search of the bottleneckWe'vebeen usingTSBS to measure and compare ingestion throughput for a few years. Consideringthat QuestDB implementsInfluxDB Line Protocol(ILP) over TCP, it's not a secret that our initial implementation of the QuestDBTSBS module was based on the InfluxDB one. We had a great start. However, weeventually discovered that the optimizations in the database had little to noeffect on the TSBS results.The most obvious explanation would be that all optimizations we were adding wereworthless, but what if TSBS was the bottleneck?Luckily that was simple to test.A meaningful approach to optimize any client-side library, such as a databasedriver or a benchmark tool, is to swap the server with a no-op implementationand then profile the library. In our case, swapping QuestDB's ILP server is assimple as running socat with the following command:socat /dev/null,ignoreeof tcp-listen:9009,fork,reuseaddrThis command runs socat TCP proxy server that consumes the data sent over thesocket and sends it to /dev/null. The only thing this no-op server does is thenetwork I/O, so it should make all client-side bottlenecks much more obvious.With the socat server, we got the following result with four workergoroutines:$ ./tsbs_load_questdb --file /tmp/data --workers 4time,per. metric/s,metric total,overall metric/s,per. row/s,row total,overall row/s1684330223,14634364.80,1.464000E+08,14634364.80,1463436.48,1.464000E+07,1463436.481684330233,14712618.43,2.936000E+08,14673493.89,1471261.84,2.936000E+07,1467349.391684330243,14703414.28,4.406000E+08,14683462.86,1470341.43,4.406000E+07,1468346.291684330253,14805896.85,5.886000E+08,14714057.21,1480589.68,5.886000E+07,1471405.72Summary:loaded 691200000 metrics in 46.962sec with 4 workers (mean rate 14718346.10 metrics/sec)loaded 69120000 rows in 46.962sec with 4 workers (mean rate 1471834.61 rows/sec)1.47M rows/s isn't awful, but we can probably do better. The next step was toprofile the loader and check any bottlenecks. But how does one profile TSBS?TSBS is written in Golang, which has a greatbuilt-in profiler called pprof. While it'scapable of collecting different kinds of profiles, it usually makes sense tostart with the CPU profile. After collecting the profile, we found the followingCPU_curl.imp.insert.partial - QuestDB
When working with timestamped data, it may be necessary to convert timestampvalues to or from UTC, or to offset timestamp values by a fixed duration. Thefollowing sections describe how QuestDB handles timestamps natively, how to usebuilt-in functions for working with time zone conversions, and general hints forworking with time zones in QuestDB.Timestamps in QuestDBThe native timestamp format used by QuestDB is a Unix timestamp in microsecondresolution. Although timestamps in nanoseconds will be parsed, the output willbe truncated to microseconds. QuestDB does not store time zone informationalongside timestamp values and therefore it should be assumed that alltimestamps are in UTC.The following example shows how a Unix timestamp in microseconds may be passedinto a timestamp column directly:CREATE TABLE my_table (ts timestamp, col1 int) timestamp(ts);INSERT INTO my_table VALUES(1623167145123456, 12);my_table;tscol12021-06-08T15:45:45.123456Z12Timestamps may also be inserted as strings in the following way:INSERT INTO my_table VALUES('2021-06-08T16:45:45.123456Z', 13);my_table;tscol12021-06-08T15:45:45.123456Z122021-06-08T16:45:45.123456Z13When inserting timestamps into a table, it is also possible to usetimestamp unitsto define the timestamp format, in order to process trailing zeros in exporteddata sources such as PostgreSQL:INSERT INTO my_table VALUES(to_timestamp('2021-06-09T16:45:46.123456789', 'yyyy-MM-ddTHH:mm:ss.N+'), 14);-- Passing 9-digit nanosecond into QuestDB, this is equal to:INSERT INTO my_table VALUES(to_timestamp('2021-06-10T16:45:46.123456789', 'yyyy-MM-ddTHH:mm:ss.SSSUUUN'), 14);my_table;The output maintains microsecond resolution:tscol12021-06-08T15:45:45.123456Z122021-06-08T16:45:45.123456Z132021-06-09T16:45:46.123456Z14QuestDB's internal time zone databaseIn order to simplify working with time zones, QuestDB usesthe tz time zone database which isstandard in the Java ecosystem. This time zone database is used internally intime zone lookup and in operations relating to timestamp value conversion to andfrom time zones.For this reason, a time zone may be referenced by abbreviated name, by full timezone name or by UTC offset:AbbreviationTime zone nameUTC offsetESTAmerica/New_York-05:00Referring to time zonesIt's strongly advised not to use the three-letter ID or abbreviation fortime zones for the following reason:The same abbreviation is often used for multiple time zones (for example,"CST" could be U.S. "Central Standard Time" and "China Standard Time"), andthe Java platform can then only recognize one of themTherefore, choosing a geographic region which observes a time zone("America/New_York", "Europe/Prague") or a UTC offset value ("+02:00") ismore reliable when referring to time zones. Instructions for converting to andfrom time zones are described in theConverting timestamps to and from time zonessection below.The current. QuestDB is a high performance, open-source, time-series database - Releases questdb/questdb. QuestDB is a high performance, open-source, time-series database - questdb/questdb. Skip to content. Download, upgrade or Download. QuestDB 7.2 Release. QuestDB. J. Tags: release; open source; questdb; QuestDB 7.2 release overview. In QuestDB 7.2, we introduce implicit variable-size time
_python.sql.query.partial - QuestDB
Install, and configure ODBC Driver for QuestDB?Download the driver. Run the installer and follow the instructions in the wizard. Open ODBC Data Sources. In the System DSN tab, click Add. Select the needed driver and click Finish.In the License tab of the Configuration dialog, click Input Activation Key and enter your key. Click OK.In the General tab of the Configuration dialog, fill in the fields with the database connection data. To test the connectivity, click Test Connection. To save the DSN, click OK.To install and configure ODBC Driver for QuestDB on macOS, download first the PKG file from the Devart website. Run the downloaded file and follow the instructions in the wizard. After installing the driver, run the 64-bit or 86-bit iODBC utility, find the needed driver, and click Configure. In the dialog box that appears, specify the required connection settings and click OK. To establish a connection to the data source, click Test.Installation of an ODBC driver on Ubuntu is carried out from the DEB package. Download the package that matches the bitness of your operating system.Then open the folder with the downloaded package, double-click the DEB package, and click Install.Open the Terminal and install the driver by using the following command.If you use CentOC, you need to download the RPM package of the corresponding bitness.After that, open the Konsole and navigate to the folder with the downloaded package specifying the path to the folder as a parameter of the cd command. Then, install the driver by using theDownload questdb-8.2.1-rt-linux-x .tar.gz (QuestDB)
Is a top-tier database management tool that excels in cross-platform compatibility, robust database support, and ease of use. It is ideal for both developers and database administrators who need a reliable, feature-packed tool for querying and managing databases. Note: 21 days trial version.Also Available: Download DbVisualizer for Mac What's new in this version: DbVisualizer 25.1.1- Change log not available for this versionDbVisualizer 25.1New Features:- DB Support: DuckDB Add basic support for DuckDB- DB Support: DynamoDB Add support for DynamoDB- DB Support: QuestDB Add basic support for QuestDB- Add support for mounting external script roots- Introduce the Files tab- Recall the latest used connection for all scriptsImproved:- DB Support: Snowflake Display streams, tasks and alerts in the database objects tree for Snowflake- Performance/Stability Use the database metadata cache to speed up references graphs and other application features- Review and improve employed encryption mechanisms- Review and improve sensitive data managementFixed:- Auto-completion doesn't handle CASE correctly in the context of WITH statements- Auto-completion doesn't work properly with UNION- Auto-completion may not work after inserting an editor template- Auto-completion may not work correctly with subquery JOINs- Connection Setup Automatically select the single existing SSH configuration when "Use SSH Tunnel" is turned on- DB Support: DB2 z/OS Detect driver licensing issues in the Db2 z/OS driver- The Db2 z/OS database profile is not loaded- DB Support: Redshift Materialized views may be displayed as ordinary views in Redshift- Grid Component Possible exception when hiding a column in the grid- Installation/Update Installation Exception when choosing to ignore a failed migration- Metadata Metadata cache may break for certain databases- Query Builder QueryBuilder should not allow adding tables from different connections- References Limit zooming and fix the visible area indicator in the references graph- Don't require master password for connections that have no protected settings- Maven repository passwords should. QuestDB is a high performance, open-source, time-series database - Releases questdb/questdb. QuestDB is a high performance, open-source, time-series database - questdb/questdb. Skip to content. Download, upgrade or Download. QuestDB 7.2 Release. QuestDB. J. Tags: release; open source; questdb; QuestDB 7.2 release overview. In QuestDB 7.2, we introduce implicit variable-size timeQuestDB - Browse /8.1.4 at SourceForge.net
About theQuestDB thread model and that workers are very likely to execute the same jobinstance simultaneously unless the job is synchronized. In this scenario, theonly place a job can reliably store a state is the connection context.Protocol ParsersProtocol parsers are used by worker threads to make sense of the incoming data.QuestDB has a convention that all protocol parsers must be streaming, e.g., theynever hold on to the entirety of the data sent over the network. These parsersare typically state machines, with state held in connection context. This typeof parser allows fully real-time ingestion of large data segments, such as textfile import.Worker ThreadsWorker threads are required to consume the IO event queue. We already mentionedthat the IODispatcher neither reads nor writes connected sockets itself. This isthe responsibility of the worker threads.Worker threads almost always use protocol parsers to interpret socket data. Theymust continue to work with the socket until the socket cannot read or writeanymore. In which case, the worker threads either express "interest" in furthersocket interaction or disconnects the socket. In this situation, IODispatcher isnot on the execution path during most of the socket interaction.Threads will often use hysteresis, which means that they busy-spin socket reador write operations until either the socket responds or the number of iterationshas elapsed. This is sometimes useful when a remote socket is able to respondwith minimum delay.Take a lookIn this article, we've covered our approach to implementing non-blocking IOusing what we think is a nice solution that's garbage-free. Kafka Connectsupport is now available since version 5.0.5. Our new network stack ingests timeseries data from Kafka topics reliably from multiple TCP connections on a singlethread without garbage collection and the QuestDB source is open tobrowse on GitHub. If you like this content and our approach tonon-blocking and garbage-free IO, or if you know of a better way to approachwhat we built, we'd love to know your thoughts! Feel free to share your feedbackjoin our community forums.Comments
Var _jq = []; var $ = function(fn) { _jq.push(fn); }; --> Support Ukraine in Her Fight for Freedom! --> Accessing the QuestDB database can be fast and seamless by using the Open Database Connectivity (ODBC) solution. Providing full interoperability, the ODBC driver for QuestDB allows you to access live QuestDB data directly from DBArtisan. It enables you to retrieve data to DBArtisan, and review and modify these data right in this application.QuestDB Key FeaturesOpen sourceLow memory leakage problemSupport for multiple table typesPlatform IndependentDBArtisan Key Features Database administrationSQL development and debuggingSchema comparison and synchronizationPerformance monitoring and tuningDirect ConnectionOur data connector enables various ODBC-aware applications to establish a direct connection to QuestDB via TCP/IP to eliminate the need for a QuestDB client. A direct connection increases the speed of data transmission between DBArtisan and QuestDB for real-time analytics. It streamlines the deployment process since there is no need to distribute any additional client-side software with the ODBC driver for QuestDB.What are some reasons to choose Devart ODBC Driver for QuestDB?IntegrationODBC Driver for QuestDB is compatible with DBArtisan allowing extraction of data by executing SQL statements.Platforms VarietyODBC Driver for QuestDB can be used with 32-bit and 64-bit applications on both x32 and x64 platforms, so there is no need to additionally configure the driver, applications, or environment.Fully Unicode-Compliant DriverWith our fully Unicode-compliant driver, you can properly retrieve and modify any data in multilingual QuestDB databases, regardless of their character set: Latin, Cyrillic, Hebrew, Chinese, etc., and in any language environment.How to download,
2025-04-16Following commands.To install the devartodbcquestdb_i386.deb on a 32-bit system, use:use sudo dpkg -i devartodbcquestdb_i386.debTo install the devartodbcquestdb_amd64.deb on a 64-bit system, use:sudo dpkg -i devartodbcquestdb_amd64.debFor more detailed information about installing and configuring ODBC Driver for QuestDB on Ubuntu, go to the documentation.To install the devart-odbc-questdb.i386.rpm on a 32-bit system, use:sudo -rpm -ivh devart-odbc-questdb.i386.rpmTo install the devart-odbc-questdb.x86_64.rpm on a 64-bit system, use:sudo rpm -ivh devart-odbc-questdb.x86_64.rpmFor more detailed information about installing and configuring ODBC Driver for QuestDB on Centos, go to the documentation.Connect DBArtisan to QuestDB data source and access data in 3 simple steps01. Install the driver and configure the ODBC data source. Start DBArtisan and in the tab panel select Datasource > dfRegister Datasource.02. In the appeared window, select Generic ODBC. Then, enter connection information in each step by clicking Next. In the end, click Finish.03.In the Datasource Navigator, double-click the needed database, and select Tables. Right-click the table and select Schema to view the data.Advantages of Connectivity to QuestDB from DBArtisan via ODBC DriverSecure ConnectionEvery operation with QuestDB becomes significantly faster using such capabilities of ourdriver as local data caching, connection pooling, and much more.Working with DBArtisan using Multiple FunctionsUsing DBArtisan, you can create tables, add data, select, delete, sort, edit, combine data from several database tables, and find unique values quickly and easily.ODBC ConformanceThe driver fully supports the ODBC interface, its data types, and functions. It offers advanced connection string parameters and allows any ODBC-compliant desktop or web application to connect to QuestDB from DBArtisan on various platforms.Simple
2025-04-20QuestDB time zone database uses the English locale but supportfor additional locales may be added in future. Referring to time zones which areoutdated or not recognized results in a invalid timezone name error. Thefollowing resources may be used for hints how to refer to time zones by ID oroffset:The official list maintained by IANAJava'sgetAvailableZoneIdsmethodWiki entry on tz database time zones(this is a convenient reference, but may not be 100% accurate)noteUsers should be aware that the time zone database contains both current andhistoric transitions for various time zones. Therefore time zone conversionsmust take the historic time zone transitions into account based on the timestampvalues.Updates to the time zone databaseThe upstream project updates past time zones as new information becomesavailable. These changes are typically related to daylight saving time (DST)start and end date transitions and, on rare occasions, time zone name changes.The tz database version used by QuestDB is determined by the JDK version used atbuild time and therefore updates to the time zone database are directlyinfluenced by this JDK version. To find the JDK version used by a QuestDB build,run the following SQL:buildBuild Information: QuestDB 7.4.0, JDK 11.0.8, Commit Hash b9776a8a09f7db35955530bff64de488a029f1ceConverting timestamps to and from time zonesFor convenience, QuestDB includes two functions for time zone conversions ontimestamp values.to_timezone()to_utc()These functions are used to convert a Unix timestamp, or a string equivalentcast to timestamp as follows:SELECT to_timezone(1623167145000000, 'Europe/Berlin');to_timezone2021-06-08T17:45:45.000000ZSELECT to_utc(1623167145000000, 'Europe/Berlin');to_utc2021-06-08T13:45:45.000000ZUsing UTC offset for conversionsThe to_timezone() andto_utc() functions may use UTCoffset for converting timestamp values. In some cases, this can be more reliablethan string or time zone ID conversion given historic changes to time zone namesor transitions. The following example takes a Unix timestamp in microseconds andconverts it to a time zone +2 hours offset from UTC:SELECT to_timezone(1213086329000000, '+02:00');to_timezone2008-06-10T10:25:29.000000ZSELECT to_utc('2008-06-10T10:25:29.000000Z', '+02:00');to_timezone2008-06-10T08:25:29.000000Z
2025-04-02