Comments (5)
@andyatkinson thanks; I didn't realised I forgot to write up about indexes so I've put some docs in #3
Unrelated, but I was in the swing of things, so #3 also starts to port over some solutions I have for text searching.
from searchcraft.
I personally cannot use the pg_ivm
extension due to our constraints on our production host; but I can imagine supporting this alternate syntax SELECT create_immv('myview', 'SELECT * FROM mytab');
instead of CREATE MATERIALIZED VIEW myview AS SELECT * FROM mytab;
. "How hard could it be?"
Currently the wrapper SQL for the MV is at
searchcraft/lib/searchcraft/builder.rb
Line 101 in 2927ddb
from searchcraft.
Thanks, yeah I haven't yet documented how to setup concurrent refreshes; nor documented how to add a new unique index column using the sequence that's already created for you. I've created #4 to track this.
from searchcraft.
@andyatkinson I appreciate your comments + questions + requests for better docs. Please let me know of any other ideas you have. I definitely don't know "all things MV".
from searchcraft.
@drnic Makes sense on the pg_ivm extension.
Also, re: indexes, passing on something else useful in case you didn't already know: refreshing a materialized view ideally is done "concurrently", so that other queries using it can continue to run while the results are replaced. Concurrent refreshes do require one unique index exists on the materialized view:
For here: https://github.com/drnic/searchcraft/blob/develop/lib/searchcraft/model.rb#L44
Docs on the concurrently
keyword and unique index requirement: https://www.postgresql.org/docs/current/sql-refreshmaterializedview.html
from searchcraft.
Related Issues (2)
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 searchcraft.