Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Per-Åke Minborg
    @minborg
    We will take a look at it @XI1354-sugandhasapra
    mohdsalmanshaikh63
    @mohdsalmanshaikh63
    Hi Team, I am trying out speement for my curiosity and testing it's amazingness to try it out in future projects. I have just setup a sample application using the tutorial page title
    and in title
    I ran the query and strangely I'm getting two queries in the output.
    2021-09-26T20:34:32.576Z INFO [main] (#APPLICATION_BUILDER) - Speedment (Open Source) version 3.2.6 by Speedment, Inc. Specification version 3.2 (Channing), License: Apache-2.0 2021-09-26T20:34:32.586Z INFO [main] (#APPLICATION_BUILDER) - Java Virtual Machine Specification 11 by Oracle Corporation. Implementation Java Platform API Specification 11.0.9 by Oracle Corporation 2021-09-26T20:34:32.594Z INFO [main] (#APPLICATION_BUILDER) - Available processors: 8, Max Memory: 4,211,081,216 bytes Loading classcom.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 2021-09-26T20:34:34.546Z INFO [main] (#APPLICATION_BUILDER) - MySQL, 8.0.23, MySQL Connector/J mysql-connector-java-8.0.18 (Revision: fef2894d751d47223192b706977b4a5bc41e6be4), JDBC version 4.2 2021-09-26T20:34:34.770Z DEBUG [main] (#STREAM) - SELECT COUNT(*) FROM (SELECTfilm_id,title,description,release_year,language_id,original_language_id,rental_duration,rental_rate,length,replacement_cost,rating,special_features,last_updateFROMsakila.filmWHERE (rating= ? COLLATE utf8_bin)) AS A, values:[PG-13] There are 223 PG-13 films in the DB
    Can someone help why two queries are being made while it should be ideally 1 query as it is there in the tutorial.
    Per-Åke Minborg
    @minborg
    I only see one query @mohdsalmanshaikh63 ? That query consist of two selects, perhaps that is your question?
    mohdsalmanshaikh63
    @mohdsalmanshaikh63
    Yes @minborg why is the subquery used instead of just select count(*) from.... ?
    Per-Åke Minborg
    @minborg
    This is due to an internal simplification in Speedment. The database will be able to “unroll” this abstraction in almost all cases.
    The idea is that we only want to return a single “long” and not all the fields.
    mohdsalmanshaikh63
    @mohdsalmanshaikh63
    I mean select count (*) from films where condition should be ideally used not two selects. I tried doing same count on other tables/entities and the result was same.
    Per-Åke Minborg
    @minborg
    The result will be same.
    As it turns out, it does not affect execution time significantly and consequently that optimization was not made.
    mohdsalmanshaikh63
    @mohdsalmanshaikh63
    Okay but will it affect performance for large data?
    Per-Åke Minborg
    @minborg
    No, most databases will be able to optimize away the redundant columns.
    mohdsalmanshaikh63
    @mohdsalmanshaikh63
    Okay thanks for the answer
    mohdsalmanshaikh63
    @mohdsalmanshaikh63
    I just have a few more concerns.
    Per-Åke Minborg
    @minborg
    OK. Let me know what’s on your mind :-)
    mohdsalmanshaikh63
    @mohdsalmanshaikh63
    Does speedment support stored procedures? Last I checked it didn't
    Per-Åke Minborg
    @minborg
    No it does not. This might be a cool feature though.
    mohdsalmanshaikh63
    @mohdsalmanshaikh63
    And does it support batch operations? I just checked it doesn't I guess but this would be helpful for background batch jobs https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/speedment/speedment/issues/539&ved=2ahUKEwjI2YDQ_6bzAhV08HMBHYM0BzcQFnoECAMQAQ&usg=AOvVaw03BXf6IFoU2iLLRlgi3sZZ
    Stored procedures don't seem to be that much of an important feature unless the project requires high performance
    vrajkuma
    @vrajkuma
    Just tried a simple speedment example with MySQL 8 using Speedment OSS. My table has BIGINT type for Primary key and the generated code (in <table>SqlAdapter.java) is failing to compile as getBigInteger(int) is not a method available in java.sql.ResultSet. I used the speedment initializer to generate the project POM. Any pointers.. thanks.
    Per-Åke Minborg
    @minborg
    Hrm.. I suspect using BIGINT for PK is not supported. Could you please create an issue on GitHub regarding your problem?
    4 replies
    vrajkuma
    @vrajkuma
    In using the JoinComponent to get a join object and then subsequently streaming it, it is unclear where you specify operations like limit(), skip(), count(), sum() so they will execute in the database as part of the generated SQL query. Doing this on the join object seems like they will execute on the client side once all tuples (based on JoinComponent) are fetched? Are the same optimizations (for limit, skip, count etc) that are done for single-table streaming also done for join object?
    Per-Åke Minborg
    @minborg
    In general, it is not specified exactly how queries are optimized and where they are executed. Depending on the join pipeline, operations may infact be executed on the database side. The best way to see is turing on logging for stream operations. Then you will see exactly how queries are rendered.
    Limit, for example, is tricky do do with joins in the generall case.
    Paulo Elienay II
    @paulo-e
    Sorry for the noob question. But how would I convert .sorted(User$.name.reversed()) to Kotlin? Can't find anything useful about predicates and kotlin
    Per-Åke Minborg
    @minborg
    I have not used Kotiln but there must be a way to use a Java Stream in Kotlin. JPAStreamer is a Java Stream so it should work the same way.
    christopinka
    @christopinka
    Are there any examples for azure cosmo db? Will the cosmo sql api work with with speedment?
    christopinka
    @christopinka
    Getting 502 running mvn speedment:tool on the initializer download.
    3 replies
    christopinka
    @christopinka
    1 reply
    dirsu
    @dirsu
    Yep, looks like the nexus is down:
    transfer failed for https://repo.speedment.com/nexus/content/repositories/releases/org/codehaus/mojo/maven-metadata.xml, status: 502 Bad Gateway
    What a pity.
    Daniel Mwai
    @danielmwai
    any fix on the repo.speedment.com/nexus repo enterprise its still down
    Per-Åke Minborg
    @minborg
    Will take a look at this.
    Per-Åke Minborg
    @minborg
    The repo is back again online. Sorry for the inconvenience.
    mlouis
    @mlouis08
    I am processing large volumes of data in batch (using Spring Batch and Spring Boot) where my job runs as multiple (identical) workers in different nodes in a k8s cluster. All workers need access to some read only data to do their processing. I am thinking of using Speedment DataStore to preload the readonly data for these workers. Looks like DataStore will need be loaded for each worker as it is part of the application. Is there a way to keep a common (readonly) DataStore for all the workers in the cluster. Would I need to create a dedicated speedment microservice app that runs in the cluster (with DataStore) that serves these requests from the worker clients. thanks
    1 reply
    Per-Åke Minborg
    @minborg
    Hi. This is an interesting question. By memory mapping the off-heap memory, it is possible to share the DataStore across processes that have access to the same file-system. As the data is immutable, there is no lock contention between threads/processes. However, this is not a standard feature. Please email me on minborg@speedment.com and we can discuss.
    1 reply
    leiffriis
    @leiffriis
    Is the enterprise repo down at the moment?
    Per-Åke Minborg
    @minborg
    Let me check
    It appers to be down. We are working on it
    Per-Åke Minborg
    @minborg
    The repo should be up and running now.
    We have upgraded the Nexus version.
    leiffriis
    @leiffriis
    Yes. Now I get the tool up and running. But I can't create a trial license. "License API returned 500"
    Per-Åke Minborg
    @minborg
    Ok. We will take a look at that too.
    Thanks for reporting the issue.
    Daniel Mwai
    @danielmwai
    Thanks the Enterprise repo is up , now the issue is on the License Creation
    The website too cant connect to the db
    Per-Åke Minborg
    @minborg
    Thanks @danielmwai The website is up again.
    leiffriis
    @leiffriis
    Any news on the License Creation?
    ravitejhaemani
    @ravitejhaemani
    Hi Team,
    Any update on license creation. tools api is failing with 500 error.
    Per-Åke Minborg
    @minborg
    We are still investigating. Sorry for the inconvenience.
    leiffriis
    @leiffriis
    Any update on the license creation?