Comments (6)
It returns a stream, which lazily pulls in page by page, so if you for instance .take(100)
on it, then it will only pull back the number of pages necessary to support that.
It will always attempt to pull back a full page of results, so you might pull back a bit more data than is strictly necessary, but there shouldn't be additional requests.
from scanamo.
Thanks. I actually need only the first result (or the last one using a descending query) with ordering given by a range key. But as DynamoDB is supporting defining a limit on queries is it planned to add this feature? And what do you think is the difference concerning performance. Thanks.
from scanamo.
It's not the near the top of my list at the moment, as my main focus with the library is to try and allow things to be done in a simple, safe way and this is currently achievable, if not optimal. Any suggestions or PRs on how it could be supported without major changes to the API would be welcome.
In terms of performance, it's very difficult to know in the abstract. I'd be a bit surprised if it was a bottleneck, but without benchmarking the particular app I wouldn't like to pretend certainty.
from scanamo.
One concern is that in an app with a single-read-heavy workload, you'd have to over-provision your tables by pagesize
. I wonder if exposing a way of setting the page size on the underlying DynamoDB req would give the developer the chance to optimise requests for the expected use-case?
I'll have a look through the code, see if I can work out a nice way to do it.
from scanamo.
That's a good point about capacity consumption. It's now definitely on the list.
from scanamo.
This is now available in 0.5.0
from scanamo.
Related Issues (20)
- Question: Async client? HOT 3
- ScalaJs support
- Cats Effect 3 migration roadmap/plans ? HOT 2
- How to dynamically build a filter expressions with reduce(_ and_) HOT 2
- CI for the Scanamo repo not running since 15th June 2021 (`travis-ci.org` decommisioned) HOT 3
- More maintainers? HOT 9
- Extend transactPutAll, transactUpdateAll and transactDeleteAll with optional ConditionExpression argument HOT 2
- Extend scan operation with Segments
- Adopt `sbt-dynamodb` into the Scanamo organisation? HOT 3
- Not able to use >= on string sort key
- Publish latest?
- Question: Should I be instantiating a different client per service?
- migrate to github action HOT 6
- Conditionally apply a filter
- [error] clienterror: an error occurred (validationexception) when calling the putitem operation: one or more parameter values were invalid: contains duplicates. HOT 1
- PutReturn.NewValue is not supported by AWS DynamoDB
- Scala 3 HOT 3
- Scanamo query timeouts...
- Null Pointer Exception when trying to call any methods accessing DynamoDb
- Where is the API documentation? HOT 1
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 scanamo.