zombodb | Making Postgres and Elasticsearch | SQL Database library
kandi X-RAY | zombodb Summary
kandi X-RAY | zombodb Summary
ZomboDB brings powerful text-search and analytics features to Postgres by using Elasticsearch as an index type. Its comprehensive query language and SQL functions enable new and creative ways to query your relational data. From a technical perspective, ZomboDB is a 100% native Postgres extension that implements Postgres' Index Access Method API. As a native Postgres index type, ZomboDB allows you to CREATE INDEX ... USING zombodb on your existing Postgres tables. At that point, ZomboDB takes over and fully manages the remote Elasticsearch index and guarantees transactionally-correct text-search query results. ZomboDB is fully compatible with all of Postgres' query plan types and most SQL commands such as CREATE INDEX, COPY, INSERT, UPDATE, DELETE, SELECT, ALTER, DROP, REINDEX, (auto)VACUUM, etc. It doesn’t matter if you’re using an Elasticsearch cloud provider or managing your own cluster -- ZomboDB communicates with Elasticsearch via its RESTful APIs so you’re covered either way. ZomboDB allows you to use the power and scalability of Elasticsearch directly from Postgres. You don’t have to manage transactions between Postgres and Elasticsearch, asynchronous indexing pipelines, complex reindexing processes, or multiple data-access code paths -- ZomboDB does it all for you.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of zombodb
zombodb Key Features
zombodb Examples and Code Snippets
Community Discussions
Trending Discussions on zombodb
QUESTION
I currently have four tables that need to be joined with a left join. There are about 400_000 (400 thousand) of data records (which will grow in the future).
In addition to the left join, the following things must be able to be executed performantly:
- A full text search using the columns purchasing.mandant_id, purchasing.company_code, purchasing_mandant_names.name, company_codes.name, purchasing.sequence_number, purchasing.year, purchasing.month.
- The full text search must also work with partial words and ignore upper and lower case.
- A number of values found (to calculate how many pages there are).
- And an offset, limit (or an alternative, which basically works the same) to specify a fixed page number for each search (no cursor functionality and we don't know what the last found id is).
- We also don't know if the next page number is the next higher number. Basically, a much higher number of pages can be given immediately.
I myself had several ideas to optimise this requirement.
full text search:
- a separate table where the columns for the full text search are concatenated in a text field (
p.client_id::text || ' '::text || pmn.name::text
) and additionally contains the id for purchasing with a gin index (gin_trgm_ops) - a completely different database system, like sonic or elasticsearch for the full text search, but I don't know how best to synchronise the data and query it in the program.
- I have found something along the lines of zombodb. Unfortunately, it has the disadvantage that deleted records are not removed from elasticsearch. And zombodb only works on a linux server and I prefer and use windows.
offset, limit:
- limit the search to purchasing.id (select purchasing.id from left join) and get all data after these ids (if this really leads to an optimisation is not sure)
- add another column which always contains the current row number with an index, this would then also have to be completely rebuilt in case of deletions. Unfortunately, it doesn't really help in general, because with a filter over this data, the row numbers are of course no longer leading.
- the same applies to the id with the addition that gaps can also occur in the id when deleting.
count
- I can't think of any optimisation at the moment, because the entire data set always has to be filtered through. The only current option would be to use the id search to return only the ids and count them. These ids can then be used to pull the rest of the required data.
Adding columns or tables to help is possible. Changing the structure is also possible as long as all data is retained.
It is also possible to change the database system if postgres does not have the required functions.
- relational
- open source
- connectable with php and nodejs
the tables:
...ANSWER
Answered 2021-Jul-12 at 11:42My solution: (I think there will be better options, but these are the only ones I have found myself)
full text search:
I created a gin_trgm_ops for a each column.
I was also interested in wildspeed. Unfortunately, this extension is no longer supported.
wildspeed would also have had the advantage of using smaller lengths < 3
.
Maybe I would look in this direction again in the future to see if there is a similar extension.
offset, limit:
Unfortunately, there are no optimisation options when a filter is applied. To optimise the performance, I have built several options into the application itself. If you get a direct link to a page, offset, limit must be used, because there is no other possibility. Besides this possibility, there is now an offset - previous offset and the last id. This way, the index is at least used a little for further navigation. But just for the direct jump there are no optimnierungsmöglichkeiten, because the data are also filtered.
count
I use a count(*) OVER() directly in the combination with the offset limit search filter, so only one query needs to be executed. It is the only optimization I have found for this.
QUESTION
I wanted to install SQLAlchemy for Python 3 for working with databases.
I searched for the package using pip3 search SQLAlchemy
, but I didn't find SQLAlchemy as part of the results.
Why don't SQLAlchemy show up in the output below, when the package is available on PyPI?
https://pypi.org/project/SQLAlchemy/
SQLAlchemy 1.3.15
...ANSWER
Answered 2020-Apr-01 at 18:38$ pip search sqlalchemy | wc -l
100
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install zombodb
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page