Hi i want to see number of new borrowers in grafana stat panel and also when i select date range from filter then data will accordingly change.
My Database - MySql
And
Below is the screen shot i attached which contains my grafana query, date selected is last 5 years
and also screenshot contains the details of query result.
Query will be this and in right sidebar panel settings made below changes
I have a table where values are being written in every few hours. However, the table is randomly being dropped after ~ 1 - 2 hours (not consistent, sometimes 65 minutes, sometimes 90minutes) and grafana will just show ‘no data’. If I change the query to another table and try to change back, the table name disappears from the drop-down list.
I have my retention policy set as ‘autogen’, so the data should not be cleared out for a week.
I will start of by saying that I'm new to Grafana.
I have a database table that is being updated externally that has say 15 columns of information on a given set of servers. I'm just trying to display the server name and current status and change the color of the row based on that status (Norm, Alert, Down) ... ideally those would be links to a detail page.
I tried the included table display which looks like it should handle it but the coloring options don't seem to work based on plain dumb text in a column or it would be perfect because it says it will color by row and includes the ability to make each row a link essentially.
grafana screen shot
I have tried with and without quotes in the Threshold values. It says in the hover help you can use comma separated values but does not seem to work for me. (I am thinking it's my config or usage btw)
Every other plugin I can find that says it wants to do this errors out when I tell it I have a table of data and not some live feed.
I´m using vfp6 and iseries communicator. I have a table with a date field. This table have several records with the '1900-01-01' value but, when I make a select to that table from foxpro, those cells show a NULL value. The same select on the communicator shows the dates just fine. My regional config is day/month/year and this is the same settings at the odbc config. I've also set SET CENTURY ON on the vfp application, but still the same. We have other clients running with no issue so I don't know what could it be the problem.
Our web based app with 100,000 concurrent users has a use case where we auto-save the user's activity every 5 seconds. Consider a table like this:
create table essays
(
id uuid not null constraint essays_pkey primary key,
userId text not null,
essayparts jsonb default '{ }' :: jsonb,
create_date timestamp with time zone default now() not null,
modify_date timestamp with time zone default now() not null
);
create index essays_create_idx on essays ("create_date");
create index essays_modify_idx on essays ("modify_date");
This works well for us as all the stuff related to a user's essay such as title, brief byline. requestor, full essay body, etc. are all stored in the essayparts column as a JSON. For auto-saving the essay, we don't insert new rows all the time though. We update each ID (each essay) with all its components.
So there are plenty of updates per essay, as this is a time consuming and thoughtful activity. Given the auto save every 5 seconds, if a user was to be writing for half an hour, we'd have updated her essay around 360 times.
This would be fine with the "HOT" (heap only tuples) functionality of PostgreSQL. We're using v10 so we are fine. However, the challenge is that we also update the modify_date column every time the essay is saved and this has an index too. Which means by the principle of HOT this is not benefiting from the HOT update and a lot of fragmentation occurs.
I suppose in the web or mobile world this is not an unusual pattern. Many services seem to auto-save content. Are they insert only? If so, if the user logs out and comes back in, how do they show the records, by looking at the max(modify_date)? Or is there any other mechanism to leverage HOT updates while also updating an indexed column in the table?
Appreciate any pointers, thank you!
Performing an update every 5 second with 100000 concurrent users will produce 20000 updates per second. This is quite challenging as such, and you would need a good system to pull it off, but autovacuum will never be able to keep up if those updates are not HOT.
You have several options:
Choose a relational database management system other than PostgreSQL that updates rows in place.
Do not index modify_date and hope that HOT will do the trick.
Perform these updates way less often than once every 5 seconds (who needs auto-save every 5 seconds anyway?).
Auto-save the data somewhere else than in the database.