Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cache]

The tag has no usage guidance.

6
votes
3answers
991 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?
0
votes
2answers
50 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 ...
8
votes
1answer
183 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 ...
0
votes
1answer
14 views

Redis has “commands” that mutate the various data types it can store. Why? Redis is primarily a cache

If you look at something like https://redis.io/commands#list, you will see that types that Redis stores and supports are fully mutable, atomically, within the data store's memory. This does not make ...
0
votes
1answer
26 views

Caching results of query for part of table that almost never change

In our database we have a table with a very large number of rows. Let's call it Table1. The greatest difficulty for us is a COUNT query to this table with some conditions (see example below): Query1 ...
1
vote
1answer
59 views

How does SQL Server determine how much memory to allocate to Data cache

SQL Server Standard Edition has a limit to how much memory it can use for the data cache. With that in mind, how does Enterprise Edition decide how much memory it can use for the data cache? Lets ...
0
votes
1answer
119 views

How does MySQL evict pages from the buffer pool?

I am trying to understand the internals of MySQL. I do know that MySQL's buffer pool management has an old/young page list as shows here. And I do know about the flushing of old dirty pages, such as ...
0
votes
0answers
50 views

no performance improvement with pgpool query result caching

I'm trying to add query result caching to a PostGIS database that's frequently hit with the same (expensive) spatial queries. Looks like pgpool-II is currently the only well-developed solution. ...
0
votes
1answer
37 views

Using a caching tool for a remote database

When the DB is on a remote server, is there any tool to cache frequent queries on the main server in order to reduce database connections? If there are any available, what features should I consider ...
1
vote
1answer
45 views

Is any caching mechamism used for non-persisted computed columns?

Does SQL Server cache the result of a non-persisted computed column so it can be reused without incurring cost of recalculation? Additional Context I've always given the advice that if using computed ...
0
votes
1answer
126 views

query_cache_type on mysql galera cluster

I was wondering could I turn on the query_cache_type for mysql galera cluster of two nodes. The scenario is : 1. Proxysql infront of two master-master galera(mysql) nodes 2. Inserts are coming ...
2
votes
0answers
180 views

Should Azure host write-caching be enabled when using MongoDB's WiredTiger storage engine

I have several virtual machines on Azure running a mongoDB replicaSet with the WiredTiger storage engine. I'm not sure about the proper host caching option to set on the disks that contain the MongoDB ...
0
votes
1answer
195 views

Reduce query execution time in frequently updated tables

The current query takes approx 6-7 seconds. Data is been fetched from 7 tables. Tables are fully normalized, frequently updated but are mostly read approximately 100 times a day. The same query gets ...
2
votes
1answer
218 views

What can data cache contain besides pages from physical disk?

While setting statistics io option ON, I see this result physical_reads are 0 and read-ahead reads are 276 which means that 276 pages of that table which are on the disk drive were in data cache, but ...
0
votes
1answer
81 views

mysql - 35GB binlog files are cached in OS cache

I have a mysql database with 5.6. Binary logs are enabled and it has 5 slaves. GTID mode enabled. Maximum binlog file size is 1GB. sync_binlog = 0 When I check the free -gh total ...
0
votes
0answers
29 views

Does PostgreSQL do the caching like applications do? [duplicate]

Applications usually cache data on an implementation of hash data structures to speed up the query, typically Memcached or Redis. Does relational databases also do the same things internally? For ...
2
votes
1answer
61 views

Caching queries that last longer then then X seconds

Let's assume that I want work with query cache enabled. For example let's set it to 128mb value but my working enviorment is very random and dynamic, so cache is full in 1 minute after setting it. ...
3
votes
4answers
11k views

Memory Usage by SQL Server

How do i check memory usage by my SQL server in production box. I am using SQL Server 2016.When ever i check task manager,it shows above 90%. I don't think that is the real memory usage by sql server. ...
7
votes
3answers
936 views

Even after Disabling Read-Ahead and clearing buffer , why there is Logical Read?

I have to find the total time taken for query to execute in SQL-SERVER 2016 when all the data pages should be in Disk only. To accomplish that , I cleared all buffers in the SQL-SERVER using the ...
0
votes
0answers
79 views

Intersystems Cache to MySQL - working (in python script), Cache to MSSQL(in SSMS) - not working

It's a question loosely related to Intersystems Cache ODBC configuration for MS SQL compatibility We're trying to find a solution and there's something that explains a lot and yet not a thing. If I ...
1
vote
2answers
3k views

Is it possible to delete cache in Mongo?

My case is that I run several queries in Mongo and measure the response time. I know that Mongo uses Memory Mapped files and cache some data in RAM. If I create an index and run a query the execution ...
0
votes
0answers
131 views

Service broker stuck infinitely looping using outdated activation stored procedure

I was debugging and stuck a bunch of log statements into my activation procedure including a statement that logs the value of @@ROWCOUNT that is used in this manner: INSERT INTO ###Debug(SomeMessage, ...
0
votes
1answer
96 views

Am I clearing the query cache correctly?

I'm trying to optimize a query but need to make sure the query cache is cleared properly for obvious reasons, however it doesn't seem to be working. I ran a query the first time and it took about 3.5 ...
-1
votes
1answer
44 views

SQL Server 2012 cache system? [closed]

I have an application that uses SQL Server 2012. Even if I change a value directly in the database (not via an application), it takes time until the application sees those changes, even if the ...
1
vote
1answer
1k views

Reasonable values for thread_cache_size in relation with Connections [closed]

I want to know reasonable values for thread_cache_size in relation with the connections that you have. Which is the good proportion? And which proportions do you handle in relation with your clients ...
1
vote
2answers
4k views

How to set cache on windows 10 pro 64bit machine

When running Mongod I get the following WARNING: The file system cache of this machine is configured to be greater than 40% of the total memory. This can lead to increased memory pressure and poor ...
12
votes
2answers
719 views

Find uncompressed size of all tables in a database

In Dynamics AX there is a caching mechanism where tables can be configured to be loaded into memory and cached. This cache is limited to a certain amount of KB to prevent memory issues. The setting I'...
1
vote
0answers
508 views

MongoDB + WiredTiger cache usage stuck on 95%

I'm running a mongo 3.4.7 cluster (8 CPU, 120GB ram, primary + 2 secondaries) with ±130 open connections, each one of them to a separate DB with ±50 collections. After a few minutes of running, cache ...
1
vote
2answers
1k views

mysql performance tuning innodb_buffer_pool_size and warming the cache (select * vs select count(*))

I have a couple of questions about tuning a MySQL (5.5) database. It seems the clients database server has never had any performance tuning done. Upon reading around, it seems the one thing is to set ...
0
votes
0answers
78 views

Postgres and OS Cache Management

I would like to know about how the OS cache works for postgres table and index files. Let's say I have a table with 10 years of data, and commonly used data only in the last 1 year. This data is ...
1
vote
0answers
17 views

What kind of object is being checked against the cache when a new query arrives? [duplicate]

After reading several resources, it's not clear to me what kind of object is being checked against SQL Server Plan Cache when a new query arrives. I see 3 possible options: The pure query text. The ...
0
votes
1answer
173 views

How to calculate total memory used by one table?

I have innodb_buffer_pool_size=100GB; show table status where name='test_tb'\G gives Data_length: 4686086144 ...
5
votes
4answers
952 views

Is our MySQL poor performance related to excessive daily query cache prunes?

We are experiencing a high number of query cache prunes per day, currently 80851746. MySQL really struggles even under a reasonable load of say 50+ concurrent connections. The host is a Physical ...
1
vote
1answer
312 views

Is it good sign? If SQL Server Buffer and Procedure cache hit ratio always showing 100%

If 100% Buffer and Procedure cache hit ratio is considered not good in general? I check Buffer Cache hit ratio with below query and it showing 100% (100.0000000000000) SELECT (a.cntr_value * 1.0 / ...
0
votes
1answer
67 views

Disallowing MariaDB query cache except from webserver (JDBC)

I have an application server (Play Framework), webserver (Caddy), and database server (MariaDB with InnoDB) that are running on a single machine for now. The database is used in two ways: client ...
2
votes
1answer
330 views

PostgreSQL 9.6.2 perfomance

I need help for server side optimization. I think it is a system file cache problem but I'm not sure, maybe I am wrong. I have 2 servers (S1, S2) with PostgreSQL 9.6.2 on both of them, the database ...
1
vote
2answers
5k views

What exactly is a “thread” in thread_cache_size, Thread_connected and thread_created?

In the MySQL 5.7 manual, I read that the thread cache has a size determined by the thread_cache_size system variable. The default value is 0 (no caching), which causes a thread to be set up for each ...
4
votes
1answer
578 views

Performance considerations for Caching Aggregate counts

We have an InventoryActivity table that holds transactional changes to item quantity: CREATE TABLE dbo.InventoryActivity( InventoryActivity_uid int IDENTITY(1,1) NOT NULL PRIMARY KEY, ...
0
votes
1answer
125 views

How to cache select with variables? (MySQL)

Context: I have complicated very often executed query: CREATE OR REPLACE VIEW ordered_words AS SELECT word.id FROM category JOIN frequency ON category.id = frequency.category_id JOIN word ON ...
0
votes
1answer
36 views

Is there possible chache query or save it in memory in MySql? Mayby Should I use something other?

I have complicated query (some joins and ordering), that I want to execute very often. Results of query can change very rarely. Query gets words form given language and category sorted by frequency, ...
2
votes
1answer
291 views

SSAS Cache Levels

I am using SSAS for reporting statistics on a big amount of data. Recently I began learning best practices for tuning and I am interesting in how SSAS caches the data. I have done my research and I'...
1
vote
1answer
2k views

Why does FREEPROCCACHE let you shrink tempdb?

Somebody did something stupid and tempdb exploded in size. Alerts are firing because the drive is full. I tried shrinking it, and it would not shrink (even though shrink queries said they worked). ...
0
votes
1answer
1k views

Clear cache in Windows

I would like to make some timing tests in my PostgreSQL database. I would like to clear cache every time I run a query to disable influence of caching on my timing results. I've read some topics about ...
0
votes
1answer
24 views

MySQL consumes memory for each portion of read

I'm using MySQL instance for read only operations (data migration to another DB). I'm reading several dozens of millions rows from one table using limited portions of data (100 000 rows) using select ...
0
votes
1answer
368 views

SQL Server Performance hit after cache rebuild

After I rebuild my indexes and update my statistics, SQL Server will have to rebuild the execution plan cache to get up to speed with the current setup. So, will the SQL server do this immediately ...
1
vote
1answer
794 views

Table cache hit rate: 0%

I have an AWS RDS Mysql Server with Table cache hit rate's problem. If I do a query on phpmyadmin (also simple query) always do it without cache. Here the mysqltuner log: MySQLTuner 1.6.12 - Major ...
1
vote
2answers
7k views

How to load entire database into memory?

I want to load my entire database into memory, but how can I do this? I have about 256 GB memory and my database is about 200 GB, so I can easily handle in memory. When I do select count(*) from ...
1
vote
1answer
3k views

Memory usage of MongoDB

I've got Django app with mongoengine, which executes some aggregation-queries often enough. The main problem is that mongod takes all the RAM and then crashes, so no LRU working, mongod just trying ...
0
votes
1answer
674 views

How can I cache queries in sqlalchemy just like I do it in mysql by using SQL_CACHE keyword?

I want to cache sqlalchemy,i have discovered that using keyword SQL_CACHE in mysql can be helpful in caching queries on demand. But how do i do it in sqlalchemy ? Is it possible ?
6
votes
1answer
594 views

Procedure Cache Dropping

We've experienced an issue with SQL Server dropping proc cache out of the blue. I'm talking 4GB down to 0 in 2 minutes. This has occurred approx once per day in the last two weeks. It does happens ...