Questions tagged [cache]
A cache is a mechanism for temporarily storing (caching) data in memory in order to reduce access time to data stored on disk drives.
173
questions
1
vote
4
answers
33
views
Buffer Pool caching in Sql clarification
I might sound a little naive to ask this question but I couldn’t find out the answer anywhere.
So my understanding is that the buffer in a sql db maintains disk pages in cache so that when a query ...
2
votes
1
answer
255
views
How to know how much memory is used by each DB user in the cache buffer?
Using this query:
SELECT
A.CACHE_BUFFER_TOTAL,
B.CACHE_BUFFER_USED,
A.CACHE_BUFFER_TOTAL - B.CACHE_BUFFER_USED AS CACHE_BUFFER_FREE
FROM
(SELECT BYTES / 1024 / 1024 ...
0
votes
0
answers
38
views
Why MongoDB getting higher memory usage?
This is the sample Python code that I used to write data in MongoDB database. After every connection close, I restart the program and I noticed an accumulation in memory count in the Task Manager. ...
0
votes
1
answer
548
views
Why the second query is so much faster than the first one?
I have a query that look like this:
SELECT
DISTINCT "articles"."id",
"articles"."company_uuid",
"articles"."status",
"articles&...
1
vote
1
answer
109
views
Which SQL Server component is in charge with checking cached execution plans for a given query?
I understand that whenever SQL server receives a query it looks in the cache plan for any matching execution plans for that query. However, most of the resources that I encountered don't specify ...
0
votes
0
answers
89
views
Disk based Key-Value store to use as LRU cache?
I am looking for a key value store to use as a LRU cache for my application. It needs to hold a lot of data (100G - 1000G) which is why I say disk based. Things I have found via Google seem to be ...
0
votes
2
answers
39
views
Performance for query filtered by user preference
I have an app, that shows data based on user preference. I will simplify it in this theoretical example:
The app shows articles filtered based on user preference for their favorite authors or their ...
0
votes
1
answer
76
views
Oracle 19c create table result_cache clause syntax
I could not find the exact syntax for the "Result_Cache" clause in the Oracle 19c documentation for the CREATE TABLE statement. It mentions the values of DEFAULT or FORCE, but not the ...
0
votes
1
answer
78
views
Testing strategies when tuning a stored procedure
I'm tuning a stored procedure that is used by the first page that loads whenever a user logs into our website and it's very frequently used. When I run the procedure the first time it runs in about 10 ...
1
vote
1
answer
651
views
How to check how many keys stored in Aerospike?
I am new to Aerospike and exploring AQL and ASADM.
I Executed command "show sets" and got response -
aql> show sets
+------------------+-------------+---------+-------------------+--------...
0
votes
0
answers
16
views
Keeping up-to-date values aggregated based on some time period
I'm considering a few solutions for a problem involving some sort of a time series data. Imagine: you have a system that keeps track of financial transactions in multiple currencies. To keep it simple,...
-1
votes
1
answer
60
views
Slow database actions - moving in consolidated server
We are currently proactively correcting performance issues with a specific SQL Server by clearing the procedure cache nightly.
In the near future, we are intending to consolidate many databases onto a ...
1
vote
1
answer
311
views
Postgres hit ratio: should big history tables be removed from the production database?
A database has these cache hit ratios:
table A: 0.006
table B: 0.955
table C: 0.023
Tables A and C are history tables. No relationship, large content and no need of fast queries, only few read ...
0
votes
0
answers
361
views
PostgreSQL cache function return value
Suppose I have defined a function that is expensive to compute. Is there a way to define an index in PostgreSQL to cache the return value for a given set of parameters?
For example, let's say that I ...
1
vote
1
answer
112
views
pg_prewarm like funcationality in MySQL
I know in Postgres, we can explicitly load a table into the cache using pg_prewarm extension, is there a similar mechanism/UDF/etc in MySQL? I know MySQL would cache data in shared buffer implicitly, ...
2
votes
1
answer
1k
views
PostgreSQL RDS: Slower than expected performance when large table / index is not in cache
I have a fairly large table, 43GB and a 14GB index, that consists of time series cost data. I am querying by date and summing the amount. When this data is not in the cache (either OS or Postgres) the ...
0
votes
0
answers
68
views
Postgresql POD Master/Slave don't clean the cache when Client stopped sending data
I'm running a Performance Stress test on our backend (NODE JS) using a client(JAVASCRIPT) that generates the stress , with a Postgres DB.
I've stopped the client from sending data after 5-6 hours , ...
1
vote
1
answer
134
views
What's the correct database behavior when two transactions change the same row/value?
I'm writing a database LRU cache in C++ for an embedded NoSQL database to solve a performance problem, and I'm trying to understand the correct assumed behavior and philosophy behind it.
Say there's a ...
1
vote
0
answers
251
views
How to prioritize indices in Postgres cache?
The server config:
RAM = 16 GB
#CPUs = 6
The Postgres config:
There is only 1 Postgres instance. I.e. no partioning, no clustering, ...
shared_buffers = 5GB
work_mem = 10MB
maintenance_work_mem = ...
6
votes
2
answers
2k
views
AWS Aurora PostgreSQL Serverless: How do you pre-warm the shared buffer after scaling?
I'm using AWS Aurora PostgreSQL Serverless with autoscaling.
It appears as though scaling clears the shared buffer, so right when we want to crank out the performance, we are forced to face-plant with ...
2
votes
0
answers
112
views
Source (eg.statement) associated with security memory cache entry (USERSTORE_TOKENPERM / TokenAndPermUserStore)
We are having a security memory cache bloating issue, known as USERSTORE_TOKENPERM or TokenAndPermUserStore. At two different instances (SQL Server 2019, SQL Server 2014 – patched to the latest SP &...
5
votes
1
answer
268
views
Non-deterministic performance of query on select, from 1s to 60s on table with 1 billion rows
I'm trying to investigate why the performance of this query is so non-deterministic. It can take anywhere from 1 seconds, to 60 seconds and above. The nature of the query is to select a "time ...
0
votes
1
answer
189
views
Create cache table [closed]
I need help with SQL Server. There is a task scheduled to run an .exe file. After the exe finish execution, I can get the logs below:
2021-03-05 22:45:00 : Create cache table
2021-03-05 22:45:00 : ...
0
votes
1
answer
238
views
Does daily pg_dump mess up postgres cache?
I migrated my geospatial Postgres 12.5 database to another cloud provider. I use postgis and I have around 35GB of data and 8GB of memory.
Performances are way worse than on my previous provider, and ...
0
votes
1
answer
61
views
Does Sql Server caches parameterized anonymous blocks?
"Anonymous block" is a term from Oracle. But speaking of the thing for sql server
Declare
....
Begin
begin trans
. . .
commit
End
If I send this SQL in parameterized form to ...
1
vote
0
answers
2k
views
MariaDB 10.3.27 - 100% Temporary tables created on disk despite/because of InnoDB?
I am using Mariadb 10.3 with InnoDB with a fairly high load. For some reason, I have 100% of my temporary tables created on disk, despite using Innodb and a large tmp_table_size (2G) (see Mysqltuner....
4
votes
1
answer
705
views
Does PostgreSQL always sequentially scan pages in the same order?
Yet another question from my discovery of the great new EXPLAIN options in PostgreSQL. This one focuses on the BUFFERS option.
Here is EXPLAIN:
EXPLAIN (ANALYZE, BUFFERS) SELECT event_time FROM ...
0
votes
1
answer
1k
views
Is there any way to disable MongoDB's cache?
I'm not getting recent data when querying, and I believe it has to do with cache.
Probably, MongoDB's cache invalidation fails somewhere. I'd like to disable it completely and I don't care about ...
1
vote
4
answers
386
views
Load index to cache is not using memory available in the key_buffer_size variable
Good afternoon folks,
I have a problem when trying to load the indexes from the MyISAM tables into MySQL memory, even though there is space available in the key_buffer_size variable, it stops loading ...
-1
votes
1
answer
396
views
On reducing MYSQL disk activity
Following this topic, I want to reduce the disk activity for my Moodle database. Currently, the following variables are set
innodb_buffer_pool_size 8589934592
innodb_buffer_pool_chunk_size 134217728
...
5
votes
1
answer
2k
views
Pre Caching Index on a large table in PostgrSQL
I have a table with about 10mln rows in it with a primary key and an index defined on it:
create table test.test_table(
date_info date not null,
string_data varchar(64) not null,
data ...
1
vote
1
answer
91
views
Is filling up plan cache causes a decrease in space allocated for data cache?
SQL Server uses allocated server memory for different kind of purposes. Two of them are plan cache and data cache which are used to store execution plans and actual data correspondingly.
My question: ...
1
vote
1
answer
162
views
Caching derived dataset automatically in SQL Server
I have a view that combines multiple tables via UNION ALL, and handles some basic errors with the data. Due to the way that the errors are handled, the view is a bit slower than I would hope. Is there ...
0
votes
1
answer
80
views
Is it possible to index or cache non-immutable function (based on date)
I have a function in my Postgres database where the calculation is based on how old a record is - so given the same parameters, it always outputs a different value.
However, I'd like to index or ...
0
votes
2
answers
627
views
SSRS Report returning old data
I have created and tested a report in Visual Studio and it returns data from a SQL server database.
Once uploaded to SSRS, the report returns old data.
What would I need to check as it appears the ...
1
vote
2
answers
819
views
How to clear SQL Agent Job Scheduler Cache
I have to submit tickets to alter job scheduling, so rather than a walk through of the GUI I try to update msdb..sysschedules via tsql script. I always see the alterations immediately via the GUI. ...
0
votes
0
answers
199
views
Firebird begin backup and forced writes off, timestamp update delayed
We have a Firebird database that's almost 200 Gbyte in sice, and for performance we have forced writes off. Please don't debate the risks of forced writes, we are aware of them. This is Firebird 3.0.4 ...
2
votes
1
answer
64
views
Can we set the fixed size for both plan cache and data cache?
As far as I know, SQL Server automatically manages the size for the components of buffer pool. I wonder if it is possible to set pre-defined size for both plan cache and data cache?
7
votes
2
answers
3k
views
How SQL Server caches data in memory
I have couple of questions on how caching of data works
Imagine we have below situation:
Server restarted or we just ran DBCC DROPCLEANBUFFERS
We have a Table1 that is 50 GB and has columns A, B, C, ...
1
vote
0
answers
561
views
Why did mongoDB reads from disk into cache suddenly increase?
This is a mongoDB replica set with 1 primary, 1 secondary and 1 arbiter.
Suddenly the reads from disk into cache and cache page evictions increased 2x-3x and stay elevated since then (all metrics ...
2
votes
2
answers
2k
views
Does Log File contain both committed and uncommitted transactions?
My question is related to SQL Server architecture. Mainly log file. In the picture below it says that when transaction is committed, log record in LOG CACHE will be moved to Log file. Does it mean ...
0
votes
1
answer
34
views
Amount of used cache / free cache
I need to find out how much cache is used, and if there is free cache available.
Background:
Queries on a production server take a lot of time when the server is under heavy load. I suspect that ...
1
vote
1
answer
3k
views
Result Cache disabled in Oracle 12c Enterprise - BYPASS status
I have two database instances, development and production that are fairly identical. On production, result cache is working fine, in development it is not. The value for the database parameter ...
0
votes
1
answer
831
views
Prepare statements plan invalidation in postgresql
Postgresql caches plans for prepared statements and their subsequent executes. see:
https://www.postgresql.org/docs/current/sql-prepare.html
https://stackoverflow.com/questions/7142335/how-does-...
2
votes
1
answer
222
views
PostgreSQL. Unstable execution time hugely exceeding planning time
PG version: 10.9
Schema:
create table core_bundle
(
id serial not null constraint core_bundle_pkey primary key,
dt_add timestamp with time zone not null,
dt_upd timestamp with time zone ...
-4
votes
1
answer
952
views
SQL Server database slow performance [closed]
I have a SQL Server database in production, and typically the performance of the application connected the database is satisfying. For some days many clients were complaining about slow performance of ...
0
votes
1
answer
341
views
How to cache inserted data with ProxySQL to avoid delays
we are using MariaDB 10.2 with Galera plugin. Cluster consists of 4 nodes - 3 are busy service complex queries and 1 is more for a backup.
Recently we came across ProxySQL and this sounds very ...
8
votes
3
answers
7k
views
Does restarting the SQL Services (on the machine) clear the server cache (for things like query plans and statistics)?
Does the server cache get wiped (similarly to when you restart the SQL instance / machine) when you only restart the SQL Services themselves?
2
votes
2
answers
765
views
Are Cataloge and relation cache in PostgreSQL per connection or global to the server?
I am trying to figure out if Postgres' relation and catalog cache are per connection or per server? I did find that plan caches are per connection. It would make sense for the cache to exist for as ...
9
votes
1
answer
840
views
SQL dumping all pages from buffer cache every few minutes
I have a single SQL2012 SP4 node running several databases.
The server has 20GB of memory available, 14GB allocated to SQL (nothing else running on the box).
Every few minutes SQL dumps the whole ...