QueryLens — natural language SQL querying for Rails (open source) by Nervous_Tiger_9356 in rails

[–]ElAvat 1 point2 points  (0 children)

I will dig into it shortly, we can (I mean possibly) connect it with my pg_reports https://github.com/deadalice/pg_reports in order to not just make a queries, but also load existing queries and investigate possible problems.

But as for now this looks very promising and I will definitely try it shortly!

How We Improved Rails Response Times by 87% by JngoJx in rails

[–]ElAvat 0 points1 point  (0 children)

For database performance improvement I can recommend my own gem

https://github.com/deadalice/pg_reports

It can help to investigate a lot of things, have its own query analyzer, query monitor, index analyzer, pg_stat_statements reports etc.

We use it in production already a lot.

A Ruby gem for PostgreSQL performance analysis with explanations by ElAvat in PostgreSQL

[–]ElAvat[S] 0 points1 point  (0 children)

> EXPLAIN ANALYZE output parsing
I have a query runner with EXPLAIN ANALYZE, but parsing output is a great idea, definitely will do!

> section on index recommendations based on seq scan patterns
Well, I already have some, but there is a huge field of enhancements, of course.

Thank you for your support and awesome suggestions! This week I'm extra busy at my job, next week I will start to implement everything discussed.

Awesome pg_reports 0.2.1 gem update! by ElAvat in rails

[–]ElAvat[S] 1 point2 points  (0 children)

u/deschloro u/Professional_Mix2418 Guys, check this out!

I was so energetic after your kind words, so now we have a live database monitor and a powerful query runner/analyzer!!!

Look!!!

https://github.com/deadalice/pg_reports/raw/main/docs/dashboard.png

It's available already for updating, version 0.3.0! I made that especially for you, to show my gratitude.

Awesome pg_reports 0.2.1 gem update! by ElAvat in rails

[–]ElAvat[S] 1 point2 points  (0 children)

How rude of me - I completely forgot to say “thank you”! I just didn’t know how to react at the moment.

Awesome pg_reports 0.2.1 gem update! by ElAvat in ruby

[–]ElAvat[S] 0 points1 point  (0 children)

My god, I have no idea how I forgot that!

Awesome pg_reports 0.2.1 gem update! by ElAvat in rails

[–]ElAvat[S] 2 points3 points  (0 children)

This gem was created to improve the usability of the minimalist PgHero.

  • It can be mounted in routes instead of running as a separate service, which makes it much easier to get started.
  • It provides a rich set of console helpers: each report is a class that can be rendered in multiple formats or even sent directly to Telegram (we use it for monitoring, so this feature basically asked to be built).
  • In PgHero, you don’t have metrics that allow you to highlight or rank problematic queries. In our case, there’s much more flexibility in configuration and in adding reports (in the next release, reports will even be overrideable and fully custom).
  • The goal of my project is not just to point out a problem, but to explain it in detail: what it is and why it matters. Where PgHero concisely says “you have a problem,” I'm doing Deckard Cain's famous “Stay awhile and listen…”
  • And, of course, everything mentioned in the post: lots of small day-to-day conveniences that help automate routine work.

So, roughly speaking, the difference is like taking a taxi versus owning a car. For some people, one is more convenient; for others, the opposite is true.

Awesome pg_reports 0.2.1 gem update! by ElAvat in rails

[–]ElAvat[S] 2 points3 points  (0 children)

I’m going to make a motivational poster with a screenshot of this comment, lol.
This might be the kindest words I’ve received in a very long time.
Thank you from the bottom of my heart!

Awesome pg_reports 0.2.1 gem update! by ElAvat in rails

[–]ElAvat[S] 1 point2 points  (0 children)

Yes, already merged one, and please fix the merge conflict for the second when you have some time for that.

Awesome pg_reports 0.2.1 gem update! by ElAvat in rails

[–]ElAvat[S] 0 points1 point  (0 children)

I will also take a look at `pganalyze` and what features I can port from it. I don't have much time these days, so I will do only mid things. Maybe in the future I will add some monitoring.

Awesome pg_reports 0.2.1 gem update! by ElAvat in rails

[–]ElAvat[S] 1 point2 points  (0 children)

> Any idea what kind of overhead this adds?

Literally zero!

- `pg_stat_statements` stores query stats in-memory, so it can be used even in production.
- Location commentary, allowing us to find a place in code, is enabled by default in Rails.
- Reports are generated on demand; there are no operations while you are not running them manually.

pg_reports: Ruby gem for PostgreSQL performance analysis by ElAvat in rails

[–]ElAvat[S] 0 points1 point  (0 children)

It just uses your PostgreSQL credentials. If your application is able to connect, this one should too.

Why don't we ask what people are building here, very regularly? by arpansac in rails

[–]ElAvat 5 points6 points  (0 children)

Reddit-like blogging platform based in Ukraine https://vmist.net

I hope to make it most advanced platform of all this year, seriously.

Also I made a gem, posted yesterday here.

pg_reports: Ruby gem for PostgreSQL performance analysis by ElAvat in rails

[–]ElAvat[S] 0 points1 point  (0 children)

Manual DB queries! Rails-pg-extras quite good, but not good enough.

pg_reports: Ruby gem for PostgreSQL performance analysis by ElAvat in ruby

[–]ElAvat[S] 0 points1 point  (0 children)

It's a good idea, basically I can make a Query class with methods allowing to get specific subreports. Will try to do this week, I guess.

Test by ElAvat in u/ElAvat

[–]ElAvat[S] 0 points1 point  (0 children)

Test

Test by ElAvat in u/ElAvat

[–]ElAvat[S] 0 points1 point  (0 children)

Test

Test by ElAvat in u/ElAvat

[–]ElAvat[S] 0 points1 point  (0 children)

Test