The document discusses different fetching strategies in Hibernate and how they impact the number of select statements issued to the database, specifically exploring the N+1 select problem. It covers lazy vs eager fetching, join vs select fetching, and examples that demonstrate how factors like accessing associated entities can increase the number of selects. The recommendations are to use join fetching where possible to avoid N+1 select issues that can occur with the default select fetching strategy.
The summary provides an overview of the key points about Guice 2.0 covered in the document:
Guice 2.0 was released in May 2009 and introduced several new features such as provider methods, binding overrides, multi-bindings, map-bindings, and private modules. It also supports third party modules for testing and other languages.
The media product represents youths and females in particular ways. It portrays British teenagers as successful rather than disruptive, and shows females as more dominant in the music industry than males. This suggests teenagers are not all unsuccessful and women can do well in rock music. The dress, location, colors and fonts represent rock music values. Some social groups are absent, including the elderly, disabled and upper classes, as they are not typically associated with the rock genre and their inclusion may lose the target audience's interest. The absent groups indicates they are not viewed as important in society or even considered.
Thomas Paine was an influential pamphleteer who contributed to both the American and French Revolutions through his writings. Born in England in 1737, he encouraged American colonists to seek independence from Britain through pamphlets like "Common Sense" and "The American Crisis," which helped boost support for the revolutionary cause. Though influential in the founding of the U.S. and French Revolution, he had few mourners at his death in 1809 due to his criticism of Christianity later in life.
Hist 140 album of the american coloniesJordan Handel
The document summarizes information about the early colonization of North America by various European powers between the 15th-18th centuries. It discusses how Africans were enslaved and brought to the Americas, the Spanish conquest of native lands and attempts to convert indigenous religions to Catholicism, the establishment of French colonies in Canada and Louisiana, conflicts between the Dutch and English for control of the Hudson River Valley, and the expansion of the vast English colonial empire across the eastern seaboard through population growth and private enterprise. Native Americans are described as the earliest colonizers who crossed into North America from Asia over 15,000 years ago during the last ice age.
The document discusses different fetching strategies in Hibernate and how they impact the number of select statements issued to the database, specifically exploring the N+1 select problem. It covers lazy vs eager fetching, join vs select fetching, and examples that demonstrate how factors like accessing associated entities can increase the number of select statements. The recommendations are to use join fetching where possible to avoid N+1 select issues that can occur with the default select fetching strategy.
The document discusses different fetching strategies in Hibernate and the N+1 select problem. It describes join, select, subselect, and batch fetching strategies based on how fetching is done and when fetching occurs. The N+1 select problem is influenced by factors like lazy loading settings, fetch modes used in queries, and whether associated entities are accessed. Various examples demonstrate how fetch strategies and lazy loading affect the number of select statements issued.
The summary provides an overview of the key points about Guice 2.0 covered in the document:
Guice 2.0 was released in May 2009 and introduced several new features such as provider methods, binding overrides, multi-bindings, map-bindings, and private modules. It also supports third party modules for testing and other languages.
The media product represents youths and females in particular ways. It portrays British teenagers as successful rather than disruptive, and shows females as more dominant in the music industry than males. This suggests teenagers are not all unsuccessful and women can do well in rock music. The dress, location, colors and fonts represent rock music values. Some social groups are absent, including the elderly, disabled and upper classes, as they are not typically associated with the rock genre and their inclusion may lose the target audience's interest. The absent groups indicates they are not viewed as important in society or even considered.
Thomas Paine was an influential pamphleteer who contributed to both the American and French Revolutions through his writings. Born in England in 1737, he encouraged American colonists to seek independence from Britain through pamphlets like "Common Sense" and "The American Crisis," which helped boost support for the revolutionary cause. Though influential in the founding of the U.S. and French Revolution, he had few mourners at his death in 1809 due to his criticism of Christianity later in life.
Hist 140 album of the american coloniesJordan Handel
The document summarizes information about the early colonization of North America by various European powers between the 15th-18th centuries. It discusses how Africans were enslaved and brought to the Americas, the Spanish conquest of native lands and attempts to convert indigenous religions to Catholicism, the establishment of French colonies in Canada and Louisiana, conflicts between the Dutch and English for control of the Hudson River Valley, and the expansion of the vast English colonial empire across the eastern seaboard through population growth and private enterprise. Native Americans are described as the earliest colonizers who crossed into North America from Asia over 15,000 years ago during the last ice age.
The document discusses different fetching strategies in Hibernate and how they impact the number of select statements issued to the database, specifically exploring the N+1 select problem. It covers lazy vs eager fetching, join vs select fetching, and examples that demonstrate how factors like accessing associated entities can increase the number of select statements. The recommendations are to use join fetching where possible to avoid N+1 select issues that can occur with the default select fetching strategy.
The document discusses different fetching strategies in Hibernate and the N+1 select problem. It describes join, select, subselect, and batch fetching strategies based on how fetching is done and when fetching occurs. The N+1 select problem is influenced by factors like lazy loading settings, fetch modes used in queries, and whether associated entities are accessed. Various examples demonstrate how fetch strategies and lazy loading affect the number of select statements issued.
The document discusses using Grails for developing an enterprise telecom application. It describes the application and deployment environment, how Grails improved development productivity, and key plugins and techniques used. Grails enabled faster development through GORM and scaffolding. AST transformations and custom components further improved code readability and maintainability. While there were frustrations with Grails, overall the developers found Groovy and Grails empowering and were enthusiastic about the technology.
QA Meetup at Signavio (Berlin, 06.06.19)Anesthezia
The document discusses establishing the architecture for an end-to-end testing project. It outlines key components like the core test structure following the Arrange-Act-Assert pattern, test data preparation, reporting with Allure, managing properties with Typesafe Config, dependency injection with Guice, executing tests on CI with Jenkins, and deploying test environments with Docker. The presenter will demonstrate establishing backend testing first before expanding to UI testing.
Join us as we look at unit tests in Apex - what they are and where they fit within an efficient and effective testing strategy. We'll also consider the demands that implementing such a strategy makes on how Apex code is structured in a Force.com application. You'll leave with an appreciation of the test pyramid, and some specific examples of mocking techniques.
The document discusses different strategies for retrieving objects from a database using Hibernate including retrieval by identifier, HQL queries, and criteria queries. It also describes Hibernate fetching strategies like lazy fetching, eager fetching, and batch fetching which can be used to minimize database access and solve the "n+1 selects" problem of loading associated objects. The "n+1 selects" problem occurs when lazy loading associated collections, resulting in n queries to load the parent objects and then n additional queries - one for each collection. This problem can be addressed using batch fetching, eager fetching, or fetching associations within queries.
The document outlines 11 functional requirements for a graphical user interface for the SCIMITAR software:
1. Prepare a scene by opening a file or metafile entry and setting resolution parameters.
2. Set the resolution by entering or loading parameters and making the scene active.
3. Update a metafile entry by creating a new entry and storing resolution parameters.
4. Set the workspace by saving or restoring resolution parameters from a loaded file.
Ensemble methods combine multiple learners to create more reliable predictions than single learners. Bagging assigns bootstrap data to classifiers and averages predictions, while boosting assigns weak learners and updates weights to correct errors. XGBoost is an optimized gradient boosting algorithm that offers excellent performance, faster execution than GBM, and various utilities like early stopping and regularization. It has Python and scikit-learn wrappers for easy integration and hyperparameter tuning.
Brand new to Sumo Logic? Get started with these 5 easy steps and get certified!
Learn the basics for how to search, parse and analyze the logs and metrics that are important to your organization. This session will guide you through running searches, simple parsing and basic analytics on your data. Learn how to convert your queries to charts and add them to Dashboards to help you visualize trends and easily identify anomalies. Lastly, learn how Alerts can help you stay on top of your critical events.
This document discusses using Mahout for machine learning tasks like clustering, classification and recommendation. It provides an overview of Mahout, describes its key algorithms and architecture. It also demonstrates how to install Mahout and run sample recommendation and clustering algorithms using MovieLens and Reuters datasets. Steps shown include preparing the data, generating vectors, running the algorithms and analyzing the results.
Filtering data in google spreadsheets - Short tutorialslenorajohnson
This document discusses how to filter data in Google Sheets. It covers basic filtering by clicking the filter icon and selecting values from columns, creating new custom filters by selecting values to filter, removing filters by turning them off from the data menu, and managing filter views by renaming, updating the range, duplicating, or deleting them from the filter icon options. It also provides a link to learn more about filtering and other spreadsheet options.
Machine learning Algorithms with a Sagemaker demoHridyesh Bisht
An algorithm is a set of steps to solve a problem. Supervised learning uses labeled training data to teach models patterns which they can then use to predict labels for new unlabeled data. Unsupervised learning uses clustering and pattern detection to analyze and group unlabeled data. SageMaker is a fully managed service that allows users to build, train and deploy machine learning models and includes components for managing notebooks, labeling data, and deploying models through endpoints.
Building a Pyramid: Symfony Testing StrategiesCiaranMcNulty
The last few years have seen a huge adoption of testing practices, and an explosion of different testing tools, in the PHP space. The difficulties come when we have to choose which tools to use, in what combinations, and how to apply them to existing codebases.
In this talk we will look at what tools are available, what their strengths are, how to decide which set of tools to use for new or legacy projects, and when to prioritise decoupling and testability over the convenience we get from our frameworks.
Extending MariaDB with user-defined functionsMariaDB plc
The document discusses user-defined functions (UDFs) in MariaDB. It provides background on UDFs, including their history and pros/cons. It then covers how to install, view, and call UDFs. The bulk of the document explains how to define a UDF in C, including the required API calls for initialization, execution, aggregation, and cleanup. It recommends a book for further reading on developing UDFs and other MariaDB plugins. Towards the end, it briefly discusses deploying a live UDF to solve the problem of matching hotel names from different sources.
Apache Calcite is a dynamic data management framework. Think of it as a toolkit for building databases: it has an industry-standard SQL parser, validator, highly customizable optimizer (with pluggable transformation rules and cost functions, relational algebra, and an extensive library of rules), but it has no preferred storage primitives. In this tutorial, the attendees will use Apache Calcite to build a fully fledged query processor from scratch with very few lines of code. This processor is a full implementation of SQL over an Apache Lucene storage engine. (Lucene does not support SQL queries and lacks a declarative language for performing complex operations such as joins or aggregations.) Attendees will also learn how to use Calcite as an effective tool for research.
2006 - Basta!: Advanced server controlsDaniel Fisher
Daniel Fisher presented information on creating custom ASP.NET server controls. He discussed the lifecycle of controls, using properties, viewstate, events, databinding, hierarchical and inheritance aspects. He demonstrated several custom controls covering resources, events, AJAX, databinding, navigation and exceptions. Server control development allows encapsulating reusable logic but introduces overhead from viewstate and postbacks.
The Ring programming language version 1.5.2 book - Part 9 of 181Mahmoud Samir Fayed
Here are the key things added in Ring 1.5 for tracing functions:
- RingVM_SetTrace() allows setting a function to be called on trace events. This function will receive information about the trace.
- RingVM_TraceData() returns an array with details of the current execution context like line number, file name, function name etc.
- RingVM_TraceEvent() returns the type of trace event, like new line, new function, return etc.
- Additional functions provide the current trace function name, ability to evaluate code in a specific scope, and control error handling during tracing.
This allows implementing a tracing function to log or print details at each step of execution. The example shows
Open Source ERP Technologies for Java Developerscboecking
PowerPoint presentation from an Austin JUG (java user's group) event in June. The purpose of the presentation is to help Java developers learn, use and extent ADemipere, a popular open source ERP.
Automated integration tests for ajax applications (с. карпушин, auriga)Mobile Developer Day
The document discusses automated integration tests for AJAX applications. It covers motivations like reliability and reducing bug time. Challenges include asynchronous behavior and lack of tools. Solutions presented are Selenium and jWebUnit for testing, as well as configuring continuous integration. Experience shows a project spending less time on manual testing after implementing automated tests.
Unit testing involves writing small pieces of code to test specific functionality. Integration testing involves testing components together without full deployment. Spring Boot provides helpful tools for testing Spring applications, including test slices to load only parts of the configuration. The document discusses unit testing, integration testing, test patterns, test doubles, the Spring TestContext framework, and testing Spring Boot applications.
Phil recently completed a 400 man-hours GTM project & shares lessons learned. Migrating from GA Classic to Universal on 6 CMS platforms and 600 GA classic events is one thing, but facing a fine if the project is not complete within 3 months ads a touch of spice! Phil cleaned-up 2 years of in-house changes, including changes such as consolidated 74 pageview tags and centralizing 20 tags into easy to mange lookup table.
Phil provides Technical insights for Advanced Implementers, aswell as Tactical insights for project managers & business people on area such as QA automation, mistakes to avoid, process examples & knowledge sharing tips.
Take-aways:
- QA tool
- Planning tools
- Free GTM developer guide
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
The document discusses using Grails for developing an enterprise telecom application. It describes the application and deployment environment, how Grails improved development productivity, and key plugins and techniques used. Grails enabled faster development through GORM and scaffolding. AST transformations and custom components further improved code readability and maintainability. While there were frustrations with Grails, overall the developers found Groovy and Grails empowering and were enthusiastic about the technology.
QA Meetup at Signavio (Berlin, 06.06.19)Anesthezia
The document discusses establishing the architecture for an end-to-end testing project. It outlines key components like the core test structure following the Arrange-Act-Assert pattern, test data preparation, reporting with Allure, managing properties with Typesafe Config, dependency injection with Guice, executing tests on CI with Jenkins, and deploying test environments with Docker. The presenter will demonstrate establishing backend testing first before expanding to UI testing.
Join us as we look at unit tests in Apex - what they are and where they fit within an efficient and effective testing strategy. We'll also consider the demands that implementing such a strategy makes on how Apex code is structured in a Force.com application. You'll leave with an appreciation of the test pyramid, and some specific examples of mocking techniques.
The document discusses different strategies for retrieving objects from a database using Hibernate including retrieval by identifier, HQL queries, and criteria queries. It also describes Hibernate fetching strategies like lazy fetching, eager fetching, and batch fetching which can be used to minimize database access and solve the "n+1 selects" problem of loading associated objects. The "n+1 selects" problem occurs when lazy loading associated collections, resulting in n queries to load the parent objects and then n additional queries - one for each collection. This problem can be addressed using batch fetching, eager fetching, or fetching associations within queries.
The document outlines 11 functional requirements for a graphical user interface for the SCIMITAR software:
1. Prepare a scene by opening a file or metafile entry and setting resolution parameters.
2. Set the resolution by entering or loading parameters and making the scene active.
3. Update a metafile entry by creating a new entry and storing resolution parameters.
4. Set the workspace by saving or restoring resolution parameters from a loaded file.
Ensemble methods combine multiple learners to create more reliable predictions than single learners. Bagging assigns bootstrap data to classifiers and averages predictions, while boosting assigns weak learners and updates weights to correct errors. XGBoost is an optimized gradient boosting algorithm that offers excellent performance, faster execution than GBM, and various utilities like early stopping and regularization. It has Python and scikit-learn wrappers for easy integration and hyperparameter tuning.
Brand new to Sumo Logic? Get started with these 5 easy steps and get certified!
Learn the basics for how to search, parse and analyze the logs and metrics that are important to your organization. This session will guide you through running searches, simple parsing and basic analytics on your data. Learn how to convert your queries to charts and add them to Dashboards to help you visualize trends and easily identify anomalies. Lastly, learn how Alerts can help you stay on top of your critical events.
This document discusses using Mahout for machine learning tasks like clustering, classification and recommendation. It provides an overview of Mahout, describes its key algorithms and architecture. It also demonstrates how to install Mahout and run sample recommendation and clustering algorithms using MovieLens and Reuters datasets. Steps shown include preparing the data, generating vectors, running the algorithms and analyzing the results.
Filtering data in google spreadsheets - Short tutorialslenorajohnson
This document discusses how to filter data in Google Sheets. It covers basic filtering by clicking the filter icon and selecting values from columns, creating new custom filters by selecting values to filter, removing filters by turning them off from the data menu, and managing filter views by renaming, updating the range, duplicating, or deleting them from the filter icon options. It also provides a link to learn more about filtering and other spreadsheet options.
Machine learning Algorithms with a Sagemaker demoHridyesh Bisht
An algorithm is a set of steps to solve a problem. Supervised learning uses labeled training data to teach models patterns which they can then use to predict labels for new unlabeled data. Unsupervised learning uses clustering and pattern detection to analyze and group unlabeled data. SageMaker is a fully managed service that allows users to build, train and deploy machine learning models and includes components for managing notebooks, labeling data, and deploying models through endpoints.
Building a Pyramid: Symfony Testing StrategiesCiaranMcNulty
The last few years have seen a huge adoption of testing practices, and an explosion of different testing tools, in the PHP space. The difficulties come when we have to choose which tools to use, in what combinations, and how to apply them to existing codebases.
In this talk we will look at what tools are available, what their strengths are, how to decide which set of tools to use for new or legacy projects, and when to prioritise decoupling and testability over the convenience we get from our frameworks.
Extending MariaDB with user-defined functionsMariaDB plc
The document discusses user-defined functions (UDFs) in MariaDB. It provides background on UDFs, including their history and pros/cons. It then covers how to install, view, and call UDFs. The bulk of the document explains how to define a UDF in C, including the required API calls for initialization, execution, aggregation, and cleanup. It recommends a book for further reading on developing UDFs and other MariaDB plugins. Towards the end, it briefly discusses deploying a live UDF to solve the problem of matching hotel names from different sources.
Apache Calcite is a dynamic data management framework. Think of it as a toolkit for building databases: it has an industry-standard SQL parser, validator, highly customizable optimizer (with pluggable transformation rules and cost functions, relational algebra, and an extensive library of rules), but it has no preferred storage primitives. In this tutorial, the attendees will use Apache Calcite to build a fully fledged query processor from scratch with very few lines of code. This processor is a full implementation of SQL over an Apache Lucene storage engine. (Lucene does not support SQL queries and lacks a declarative language for performing complex operations such as joins or aggregations.) Attendees will also learn how to use Calcite as an effective tool for research.
2006 - Basta!: Advanced server controlsDaniel Fisher
Daniel Fisher presented information on creating custom ASP.NET server controls. He discussed the lifecycle of controls, using properties, viewstate, events, databinding, hierarchical and inheritance aspects. He demonstrated several custom controls covering resources, events, AJAX, databinding, navigation and exceptions. Server control development allows encapsulating reusable logic but introduces overhead from viewstate and postbacks.
The Ring programming language version 1.5.2 book - Part 9 of 181Mahmoud Samir Fayed
Here are the key things added in Ring 1.5 for tracing functions:
- RingVM_SetTrace() allows setting a function to be called on trace events. This function will receive information about the trace.
- RingVM_TraceData() returns an array with details of the current execution context like line number, file name, function name etc.
- RingVM_TraceEvent() returns the type of trace event, like new line, new function, return etc.
- Additional functions provide the current trace function name, ability to evaluate code in a specific scope, and control error handling during tracing.
This allows implementing a tracing function to log or print details at each step of execution. The example shows
Open Source ERP Technologies for Java Developerscboecking
PowerPoint presentation from an Austin JUG (java user's group) event in June. The purpose of the presentation is to help Java developers learn, use and extent ADemipere, a popular open source ERP.
Automated integration tests for ajax applications (с. карпушин, auriga)Mobile Developer Day
The document discusses automated integration tests for AJAX applications. It covers motivations like reliability and reducing bug time. Challenges include asynchronous behavior and lack of tools. Solutions presented are Selenium and jWebUnit for testing, as well as configuring continuous integration. Experience shows a project spending less time on manual testing after implementing automated tests.
Unit testing involves writing small pieces of code to test specific functionality. Integration testing involves testing components together without full deployment. Spring Boot provides helpful tools for testing Spring applications, including test slices to load only parts of the configuration. The document discusses unit testing, integration testing, test patterns, test doubles, the Spring TestContext framework, and testing Spring Boot applications.
Phil recently completed a 400 man-hours GTM project & shares lessons learned. Migrating from GA Classic to Universal on 6 CMS platforms and 600 GA classic events is one thing, but facing a fine if the project is not complete within 3 months ads a touch of spice! Phil cleaned-up 2 years of in-house changes, including changes such as consolidated 74 pageview tags and centralizing 20 tags into easy to mange lookup table.
Phil provides Technical insights for Advanced Implementers, aswell as Tactical insights for project managers & business people on area such as QA automation, mistakes to avoid, process examples & knowledge sharing tips.
Take-aways:
- QA tool
- Planning tools
- Free GTM developer guide
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
How to Manage Your Lost Opportunities in Odoo 17 CRMCeline George
Odoo 17 CRM allows us to track why we lose sales opportunities with "Lost Reasons." This helps analyze our sales process and identify areas for improvement. Here's how to configure lost reasons in Odoo 17 CRM
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
2. Topics
● Fetching strategies
● Types of fetching strategies
– How fetching is done
– When fetching is done
● N+1 select problem
– Factors that influence number of select statements
– Various examples
● Recommendation
2
4. What is a Fetching Strategy?
● A fetching strategy is the strategy Hibernate will
use for retrieving associated objects if the
application needs to navigate the association.
● Fetching strategy will have performance impact
● Fetch strategies may be declared in the
mapping files, or over-ridden by a particular
HQL or Criteria query.
4
5. Types of Fetching Strategies
● How fetching is done
– Join
– Select (default)
– Subselect
– Batch
● When fetching is done
– immediate
– lazy (default)
5
7. Join Fetching
● Hibernate retrieves the associated instance or
collection in the same SELECT, using an
OUTER JOIN
7
8. Join Fetching in HQL
String hql = "from Product p join fetch p.supplier as s";
Query query = session.createQuery(hql);
List results = query.list();
8
9. Join Fetching in Criteria API
Criteria crit = session.createCriteria(Product.class);
crit.setFetchMode("supplier", FetchMode.JOIN);
List results = crit.list();
9
10. Select Fetching
● Default fetch mode
● Vulnerable to N+1 selects problem
– “N” number of SELECT's are used to retrieve the
associated entity or collection.
● Unless you explicitly disable lazy fetching by
specifying lazy="false", the subsequent select
will only be executed when you actually access
the association.
10
11. Subselect Fetching
● A second SELECT is used to retrieve the
associated collections for all entities retrieved in
a previous query or fetch.
● Unless you explicitly disable lazy fetching by
specifying lazy="false", this second select will
only be executed when you actually access the
association.
11
12. Batch Fetching
● An optimization strategy for select fetching -
Hibernate retrieves a batch of entity instances or
collections in a single SELECT, by specifying a
list of primary keys or foreign keys.
12
13. Tuning fetch strategies
● Select fetching (the default) is extremely
vulnerable to N+1 selects problems, so you
might want to enable join fetching in the
mapping document:
<set name="permissions"
fetch="join">
<key column="userId"/>
<one-to-many class="Permission"/>
</set
13
17. Example Scenario
● Supplier with a one-to-many relationship with
Product.
– One Supplier has (supplies) many Products
17
18. Example Data
******** Table: Supplier *******
+-------------+----------------------+
| ID | NAME |
+-------------+----------------------+
|1 | Supplier Name 1 |
|2 | Supplier Name 2 |
|3 | Supplier Name 3 |
|4 | Supplier Name 4 |
+-------------+----------------------+
******** Table: Product *******
+-------------+----------------------+--------------------------------+------------------------+--------------------+
| ID | NAME | DESCRIPTION | PRICE | SUPPLIERID |
+-------------+----------------------+--------------------------------+------------------------+--------------------+
|1 | Product 1 | Name for Product 1 | 2.0 |1 |
|2 | Product 2 | Name for Product 2 | 22.0 |1 |
|3 | Product 3 | Name for Product 3 | 30.0 |2 |
|4 | Product 4 | Name for Product 4 | 7.0 |3 |
+-------------+----------------------+--------------------------------+------------------------+--------------------+
18
19. Factors that influence “number of
select statements”
● When fetching is done
– lazy mode for Supplier
● How fetching is done
– Fetch mode used for querying on Product
– Select vs. Join
● Whether Supplier is accessed through Product or
not
● Caching
– Whether Supplier is cached or now
19
23. Example #1
● Factors
– lazy mode for Supplier set to “true” (default)
– Fetch mode used for querying on Product is Select
fetch mode (default)
– Supplier information is not accessed
– Caching does not play a role for the first time the
Supplier is accessed
● Sample project in the hands-on lab
– 01HibernateHQLQuery-LazyTrue-SelectFetch-
SupplierNotAccessed
23
24. Supplier.hbm.xml: lazy=”true”
<hibernate-mapping>
<!-- lazy attribute is not set so it takes the default value of true -->
<class name="Supplier">
<id name="id" type="int">
<generator class="increment"/>
</id>
<property name="name" type="string"/>
<bag name="products" inverse="true" cascade="all,delete-
orphan">
<key column="supplierId"/>
<one-to-many class="Product"/>
</bag>
</class>
</hibernate-mapping> 24
25. Fetch mode is Select Fetch (default)
// It takes Select fetch mode as a default
Query query = session.createQuery( "from Product p");
List list = query.list();
// Supplier is not being accessed
displayProductsListWithoutSupplierName(results);
25
26. Supplier is not accessed
public static void displayProductsListWithoutSupplierName(List list){
Iterator iter = list.iterator();
if (!iter.hasNext()){
System.out.println("No products to display.");
return;
}
while (iter.hasNext()){
Product product = (Product) iter.next();
// String msg = product.getSupplier().getName() + "t";
String msg = "t";
msg += product.getName() + "t";
msg += product.getPrice() + "t";
msg += product.getDescription();
System.out.println(msg);
}
}
26
27. Number of Select Statements
select ... various field names ... from PRODUCT
● 1 select statement for Product
● Delayed N+1 select problem, however, since
Supplier is not accessed for now
27
29. Example #2
● Factors
– lazy mode for Supplier set to “true” (default)
– Fetch mode used for querying on Product is Select
fetch mode (default)
– Supplier information is accessed
– Caching does not play a role for the first time the
Supplier is accessed
● Sample project in the hands-on lab
– 02HibernateHQLQuery-LazyTrue-SelectFetch-
SupplierAccessed
29
30. Fetch mode is Select Fetch (default)
// It takes Select fetch mode as a default
Query query = session.createQuery( "from Product p");
List list = query.list();
// Supplier is being accessed
displayProductsListWithSupplierName(results);
30
31. Supplier is accessed
public static void displayProductsListWithSupplierName(List list){
Iterator iter = list.iterator();
if (!iter.hasNext()){
System.out.println("No products to display.");
return;
}
while (iter.hasNext()){
Product product = (Product) iter.next();
String msg = product.getSupplier().getName() + "t";
String msg = "t";
msg += product.getName() + "t";
msg += product.getPrice() + "t";
msg += product.getDescription();
System.out.println(msg);
}
}
31
32. Select Statements Used
select ... various field names ... from PRODUCT
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
● Result
– 1 select statement for Product
– N select statements for Supplier
● This is N+1 select problem!
32
34. Example Scenario #3
● Factors
– lazy mode for Supplier set to “false”
– Fetch mode used for querying on Product is Select
fetch mode (default)
– Supplier information is not accessed
– Caching does not play a role for the first time the
Supplier is accessed
● Sample project in the hands-on lab
– 03HibernateHQLQuery-LazyFase-SelectFetch-
SupplierNotAccessed
34
36. Fetch mode is Select Fetch (default)
// It takes Select fetch mode as a default
Query query = session.createQuery( "from Product p");
List list = query.list();
// Supplier is not being accessed
displayProductsListWithoutSupplierName(results);
36
37. Select Statements Used
select ... various field names ... from PRODUCT
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
● Result
– 1 select statement for Product
– N select statements for Supplier
● This is N+1 select problem!
– Even though Supplier is not accessed, because lazy is
set to false, N select statements are used to access
Supplier
37
39. Example Scenario #4
● Factors
– lazy mode for Supplier set to “false”
– Fetch mode used for querying on Product is Select
fetch mode (default)
– Supplier information is accessed
– Caching does not play a role for the first time the
Supplier is accessed
● Sample project in the hands-on lab
– 04HibernateHQLQuery-LazyFase-SelectFetch-
SupplierAccessed
39
40. Select Statements Used
select ... various field names ... from PRODUCT
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
● Result
– 1 select statement for Product
– N select statements for Supplier
● This is N+1 select problem!
– Even though Supplier is not accessed, because lazy is
set to false, N select statements are used to access
Supplier
40
42. Example #5
● Factors
– lazy mode for Supplier set to “true” (default)
– Fetch mode used for querying on Product is Join fetch
mode
– Supplier information is not accessed
– Caching does not play a role for the first time the
Supplier is accessed
● Sample project in the hands-on lab
– 05HibernateHQLQuery-LazyTrue-JoinFetch-
SupplierNotAccessed
42
43. Fetch mode is Join Fetch
// Perform Join Fetch
String hql = "from Product p join fetch p.supplier as s";
Query query = session.createQuery(hql);
List results = query.list();
// Supplier is not being accessed
displayProductsListWithoutSupplierName(results);
43
44. Number of Select Statements
select ... various field names from Product product0_ inner join
Supplier supplier1_ on product0_.supplierId=supplier1_.id
● 1 inner join select statement
● No N+1 select problem
44
46. Example #6
● Factors
– lazy mode for Supplier set to “true” (default)
– Fetch mode used for querying on Product is Join fetch
mode
– Supplier information is accessed
– Caching does not play a role for the first time the
Supplier is accessed
● Sample project in the hands-on lab
– 06HibernateHQLQuery-LazyTrue-JoinFetch-
SupplierAccessed
46
47. Fetch mode is Join Fetch
// Perform Join Fetch
String hql = "from Product p join fetch p.supplier as s";
Query query = session.createQuery(hql);
List results = query.list();
// Supplier is being accessed
displayProductsListWithSupplierName(results);
47
48. Number of Select Statements
select ... various field names from Product product0_ inner join
Supplier supplier1_ on product0_.supplierId=supplier1_.id
● 1 inner join select statement
● No N+1 select problem
48
50. Example #7
● Factors
– lazy mode for Supplier set to “false”
– Fetch mode used for querying on Product is Join fetch
mode
– Supplier information is not accessed
– Caching does not play a role for the first time the
Supplier is accessed
● Sample project in the hands-on lab
– 07HibernateHQLQuery-LazyFalse-JoinFetch-
SupplierNotAccessed
50
51. Number of Select Statements
select ... various field names from Product product0_ inner join
Supplier supplier1_ on product0_.supplierId=supplier1_.id
● 1 inner join select statement
● No N+1 select problem
51
53. Example #8
● Factors
– lazy mode for Supplier set to “false”
– Fetch mode used for querying on Product is Join fetch
mode
– Supplier information is accessed
– Caching does not play a role for the first time the
Supplier is accessed
● Sample project in the hands-on lab
– 08HibernateHQLQuery-LazyFalse-JoinFetch-
SupplierAccessed
53
54. Number of Select Statements
select ... various field names from Product product0_ inner join
Supplier supplier1_ on product0_.supplierId=supplier1_.id
● 1 inner join select statement
● No N+1 select problem
54
55. Example #9
LazyTrue-SelectFetch-
SupplierAccessed-Caching
55
56. Example #2
● Factors
– lazy mode for Supplier set to “true” (default)
– Fetch mode used for querying on Product is Select
fetch mode (default)
– Supplier information is accessed
– Caching play a role the Supplier is accessed the
second time
● Sample project in the hands-on lab
– HibernateHQLQuery-LazyTrue-SelectFetch-
SupplierAccessed-Caching
56
57. Access Supplier Through Cache
System.out.println("n---Performing HQL query with LazyTrue-SelectFetch-SupplierAccessed..."
Query query = session.createQuery("from Product");
List results = query.list();
displayProductsListWithSupplierName(results);
System.out.println("n---Performing HQL query using Cache...");
Query query = session.createQuery("from Product");
List results = query.list();
displayProductsListWithSupplierName(results);
// Clear cache
session.clear();
System.out.println("n---Performing HQL query after clearing Cache...");
Query query = session.createQuery("from Product");
List results = query.list();
displayProductsListWithSupplierName(results);
57
58. Select Statements Used
select ... various field names ... from PRODUCT
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from PRODUCT
select ... various field names ... from PRODUCT
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
select ... various field names ... from SUPPLIER where SUPPLIER.id=?
58
60. Recommendation
● Join fetching is good for small collection of child
objects often used with parent
● Large collections and/or not always used
collections are better retrieved with lazy select
fetching
60