Пікірлер
@user-ho6jl4mz1t
@user-ho6jl4mz1t 3 ай бұрын
ty
@TheSoulamimukherjee
@TheSoulamimukherjee 5 ай бұрын
Loved it . Amazing explanation
@ahmadyasin4764
@ahmadyasin4764 6 ай бұрын
Thank you for posting 👍
@user-rj1be9mr7k
@user-rj1be9mr7k 6 ай бұрын
@kolobok-world
@kolobok-world 11 ай бұрын
Hello, please tell me, general information about approxim_bloat i can see in dashboards DB overview, Health-check. somewhere i can see information on bloat for specific tables (names of tables with bloat) ? thank you
@ARrg-s6p
@ARrg-s6p Жыл бұрын
0:35
@necrotikS
@necrotikS Жыл бұрын
Thanks for the video, but I think this is a very difficult topic. I have the following columns: status, which can be either "SCHEDULED", "PENDING" or "CANCELED", field_id and the duration, which is a tstzrange type. I need a constraint that do not allow creating overlapping appointments for the same field ONLY IF THE APPOINTMENT STATUS IS "SCHEDULED". If there are appointment with status "PENDING" or "CANCELED", there could be other overlapping appointments. For example: Row 1 (Field 1, "SCHEDULED", '[2023-01-01 08:00:00, 2023-01-01 09:00:00)') Tries to create overlapping appointment with any status, should not allow, since there's a "SCHEDULED" appointment, for example: INSERT (Field 1, "PENDING", '[2023-01-01 08:00:00, 2023-01-01 09:00:00)') OR (Field 1, "PENDING", '[2023-01-01 08:00:00, 2023-01-01 09:00:00)') OR (Field 1, "CANCELED", '[2023-01-01 08:00:00, 2023-01-01 09:00:00)') However, if we update the Row 1 to status "CANCELED" or "PENDING", when the user tries to create the previous overlapping appointment, it should allow, since the status is not "SCHEDULED" anymore. Is it possible to achieve this logic using the examples demonstrated in the video?
@cybertecpostgresql
@cybertecpostgresql Жыл бұрын
@necrotikS should be fairly easy by using a partial index, i.e. just append the following: where status = 'SCHEDULED' ...to the index definition
@necrotikS
@necrotikS Жыл бұрын
@@cybertecpostgresql Yes, I had already tried using this WHERE clause, however, the only thing that it changes is that it checks for overlapping when the new row has status "SCHEDULED". But I need the check to run for any status, and throw the error if overlapping with any "SCHEDULED" appointments. With this WHERE you told me to use, I can have a appointment with status "PENDING" overlapping with an already existing appointment with status "SCHEDULED", but that can never happen. It only works for creating a new appointment with status "SCHEDULED", then, it throws the error.
@ChristophBergPG
@ChristophBergPG Жыл бұрын
@@necrotikS The easy options to deal with the status column in an exclusion constraint are: * ignore it * exclude (status with = ) * only look at SCHEDULED - where (status = 'SCHEDULED') What you are asking for is "exclude if one of the status values is 'SCHEDULED'" which is unfortunately more complicated. The idea would be to create a new operator to exclude on in place of = which check if either argument is 'SCHEDULED'. That part is easy: create function one_is_scheduled (a text, b text) returns boolean language sql return 'scheduled' in (a, b) ; create operator ==*== ( leftarg = text, rightarg = text, function = one_is_scheduled, commutator = ==*==); And then define the table as follows: create extension btree_gist; create table events ( field_id int, status text, time tstzrange, exclude using gist ( field_id with =, status with ==*==, time with && ) ); However, that is not enough: ERROR: 42809: operator ==*==(text,text) is not a member of operator family "gist_text_ops" DETAIL: The exclusion operator must be related to the index operator class for the constraint. At this point, I'd just give up since defining operator families is a quite deep rabbit hole. On a side note, exclusion constraints are symmetric. This means, that while if the above worked, it would prevent any new inserts of a PENDING event if a matching SCHEDULED event is already there, it would also prevent a SCHEDULED event to be inserted if a PENDING event is also there. Not sure this would be desired in the workflow you describe. I'd be curious if anyone finds a clever solution that works, but my current guess would be it's not easy.
@necrotikS
@necrotikS Жыл бұрын
@@ChristophBergPG thank you for the answer. Well, I guess I'll stick to code validation. Probably I'll change the columns I already have to a single range column (currently I don't use it), and before inserting any new rows, I use the available range operators to check for overlapping and status, since they're very good and simpler than my current SQL queries for finding that.
@ChristophBergPG
@ChristophBergPG Жыл бұрын
Perhaps as a practical answer: I would probably go with the "where (status = 'SCHEDULED') partial exclusion constraint that solves the problem in the strict sense that no two events can be scheduled in parallel, and deal with the "soft" part of the problem on the application side by simply checking for any conflicting events before inserting a PENDING one.
@AyanBabylbek
@AyanBabylbek Жыл бұрын
Hi! Is it possible to launch pgwatch docker container with specified yaml configuration?
@cybertecpostgresql
@cybertecpostgresql Жыл бұрын
Hi, here is the documentation for the customized yaml setup pgwatch2.readthedocs.io/en/latest/custom_installation.html?highlight=yaml#yaml-based-setup if it doesn't work you can open an issue on Github github.com/cybertec-postgresql/pgwatch2 Hope that helps 🙂
@DarshanaHashendra
@DarshanaHashendra Жыл бұрын
Is there any other solution except CITEXT?
@DarshanaHashendra
@DarshanaHashendra Жыл бұрын
Does CITEXT case performance issues? I saw in a article it cased unnessasary overhead into the system.
@Qwaternion
@Qwaternion Жыл бұрын
Bro, it's really good video. Thank You for your lesson!
@MuhammadFahreza
@MuhammadFahreza Жыл бұрын
Hi Kaarel, thanks for great introduction of pgwatch. I was wondering, can Pgwatch help me to find out / list long-time running queries that happened in my PSQL ? thanks !
@cybertecpostgresql
@cybertecpostgresql Жыл бұрын
@MuhammadFahreza there are some dashboards for this, e.g. "Stat statements Top". You can check it out on our demo site: demo.pgwatch.com/d/stat-statements-top/stat-statements-top
@piyusgupta9498
@piyusgupta9498 Жыл бұрын
Too good, thanks for sharing this :+1:
@malymohsem285
@malymohsem285 2 жыл бұрын
psql -f /etc/pgwatch2/metrics/00_helpers/get_psutil_cpu/9.1/metric.sql mydb. what is mydb here ? my database name or something else!
@parsapahlavan4878
@parsapahlavan4878 2 жыл бұрын
Thanks man I used this
@GIS-Engineer
@GIS-Engineer 2 жыл бұрын
How to import more than 5000 coloumn in postgresql
@ramsiddu007
@ramsiddu007 2 жыл бұрын
Happy to see all elephants 🐘🦣🐘🦣 gathered at one place ❤️❤️❤️ from 🇮🇳
@ignasscio
@ignasscio 2 жыл бұрын
Amazing!
@jefersonnl
@jefersonnl 2 жыл бұрын
Unfortunately, if you're relying on a ORM framework, like JPA, Eloquent or Sequelize, you're pretty much ssss crewe dddd. You're gonna end up having to fall back to the very bad practice of writing native queries or native ddl, negating the framework advantage of decupling in the first place. MySQL/MariaDB and SQL Server have a much simpler and painless way of solving this, you just set a database collate/collation and it's done(witch can give you not only case-insensitive but accent-insensitive as well, out of the box). Some 10 years away from Postgres and when I come back I see not much has changed in the meanwhile.
@cybertecpostgresql
@cybertecpostgresql 2 жыл бұрын
Well, every system has different ways of handling those things. Collations are never easy as they change sort order which of course impacts sort order and all that. We believe there can never be an ideal solution.
@asadurchudori49
@asadurchudori49 3 жыл бұрын
❤️❤️❤️
@aidynabirov7728
@aidynabirov7728 3 жыл бұрын
Good explanation!
@santoshaluru7366
@santoshaluru7366 3 жыл бұрын
Hi Kaarel, Thanks alot for the video. Please make a video on setting up a SMTP in the pgwatch2 docker image which will help in setting up alerts for metrics.
@ttjoseph1
@ttjoseph1 3 жыл бұрын
Lol “You can ask me stuff not just the marketing shit I’ve shown you”
@domienbakker
@domienbakker 3 жыл бұрын
Only ora2pg is free, while Cybertec starts at 2500 US dollar. I don't know both products but there is a big difference in license fees which might be the reason to choose for ora2pg above cybertec.
@cybertecpostgresql
@cybertecpostgresql 3 жыл бұрын
Hi Domien Bakker, Thanks a lot for your input. ora2pg is indeed an excellent product and for small migrations certainly has a lot of incentives. However, for large and complex databases, it tends to be very slow and complicated. Especially, when talking about downtime, the CYBERTEC Migrator excels at data load speed (NIC saturation) and the UI is very user-friendly. We have a lot of excellent staff working on this project and also offer commercial support and assistance with migrations. Contact us if you need more information! Cheers, CYBERTEC team
@karenta5138
@karenta5138 3 жыл бұрын
I love how Hans always explains concepts in a clear and concise manner! Looking forward to more videos.
@balaganesh6992
@balaganesh6992 3 жыл бұрын
Hi Bro, The volume of data is very large in Oracle database . In this case, is it possible to export or import directly particular partition in a particular table using Ora2Pg. For example table name is TF_M_PROMO partition name is P202009 . I tried several options but unfortunately it is not working . Thanks , Bala
@colorizedenhanced-silentmo8308
@colorizedenhanced-silentmo8308 4 жыл бұрын
How are ya, CYBERTEC Data Science & PostgreSQL. it is fairly remarkable video. thanks. :)
@KommaAchtKommaEins
@KommaAchtKommaEins 5 жыл бұрын
Danke für die gute Erklärung. Nach mehreren vergeblich Verstehensversuchen habe ich jetzt endlich verstanden, worum es geht.
@timhormersdorf
@timhormersdorf 8 жыл бұрын
Hey, bzgl dem ordering in dem windowing frame, wenn man wie bereits gesagt ein order dort ansetzt dann erreicht man ein high water mark Resultat. wenn man das order weg lässt findet ja keinerlei Sortierung statt von daher überlässt man die Sache doch dem zufall? müsste man nicht eine Sortierung nach Produktion vornehmen um das Ergebnis zu garantieren? Gruß Tim
@frankstreitzig4452
@frankstreitzig4452 9 жыл бұрын
Um die Beispiele nachvollziehen zu können, wäre es praktisch wenn Sie die URL der Rohdaten mit hier posten könnten. Danke im Voraus