Comments (3)
it is an excellent spot, thanks. I've added your changes to repository.
As far as partitioning by "interval" type, would this work if you had different journals for separate interval types?
JournalWriter<Quote> w1 = factory.writer(Quote.class, "quote_1");
JournalWriter<Quote> w3 = factory.writer(Quote.class, "quote_3");
JournalWriter<Quote> w5 = factory.writer(Quote.class, "quote_5");
JournalWriter<Quote> w60 = factory.writer(Quote.class, "quote_60");
I would make interval type a byte (to save disk space):
public void append(Quote q) {
switch (q.getType()) {
case 1:
w1.append(q);
break;
case 3:
w3.append(q);
break;
case 5:
w5.append(q);
break;
case 60:
w60.append(q);
break;
}
}
It should be possible to search by symbol + interval. First you declare where symbols are:
JournalFactory factory1 = new JournalFactory(
new JournalConfigurationBuilder() {{
$(Quote.class)
// name of symbol field + total number of values it can have (hint)
.$sym("sym").index().valueCountHint(15)
// name of timestamp field
.$ts("timestamp")
;
}}.build("path")
);
Next you can search them:
for (Quote q : w.query().all().withSymValues("sym", "ABC", "CDE").slice(Dates.interval(a, b)).asResultSet()) {
...
}
hope this helps,
from questdb.
Really appreciate your quick response!
I'm sorry for my ignorance, but is there any way to get the changes through maven? Not sure if you do daily builds etc.
I wasn't aware that I can bypass journal name to factory.writer. Missed that. Thanks a lot! I think that should work then.
from questdb.
No problem, nfsdb should be better documented.
If you add this to your pom.xml you should be able to pull snapshot in (2.0.1-SNAPSHOT):
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
from questdb.
Related Issues (20)
- `create as select` and `insert as select` should not be atomic by default
- first_value window function returns incorrect result when used over sample by result HOT 1
- Confusing Window function syntax RANGE and ROWS
- Do nothing on DEDUP UPSERT HOT 2
- Error using JOIN and GROUP BY for aliased column HOT 3
- Add support for cast(geohash_column as VARCHAR/STRING)
- Support interval scans for designated timestamp WHERE expressions that include OR HOT 1
- Fix questdb.service example
- AssertionError thrown in time-range filter and order by timestamp query
- regression: HTTP HEAD method on `/`
- Flaky AlterWalTableLineTcpReceiverTest.testAlterCommandTruncateTable()
- Improve performance of filtered distinct symbol query
- Segfault (abort trap 6) in
- Flaky AlterWalTableLineTcpReceiverTest.testAlterCommandTruncateTable() HOT 1
- Http server hangs if QDB_PG_ENABLED=false
- Optimize SAMPLE BY + ORDER BY ts DESC + LIMIT N queries
- Reconcile WAL/Sequencer and actual table metadata on successful resume
- Support HTTP pipelining for ILP/HTTP
- Support for passing aggregate functions as arguments to other functions
- Flaky MetricsIODispatcherTest.testMultipleChunksPeerIsSlowToRead()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from questdb.