Questions tagged [size]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
66 views

Mongodb index keeps growing in size eventhough the collection has a TTL index

I work on a mongodb sharded cluster (3.0.2 i know it's very outdated, not my call), on which i have a sharded db and a sharded collection on which i have multiple indexes. One of the indexes is a TTL ...
3
votes
1answer
119 views

Alert on Table size

I need to create an alert on my application table when it reaches 98% of its threshold. I wrote an SP which checks the rows and logs the information into a log file which was monitored by alert system ...
1
vote
2answers
211 views

Calculate size of the filtered rows of a table in sql server

My requirement is to know the size occupied(count of records and size in mb) by a table during every 24 hours, I found query to get the whole size of a table but not sure on where to start with or how ...
0
votes
0answers
21 views

Postgresql index size: penalty for composite type?

My question refers to Postgresql 12.2. I have two almost identical tables, structure- and contentwise, the main difference being that the primary key of the second table is a composite type, while the ...
0
votes
2answers
45 views

Size of a MyISAM table doubles after OPTIMIZE

I have this table: CREATE TABLE `foo` ( `CalculatedResultsId` int NOT NULL, `Md5Hash` char(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `SectionData` json NOT NULL ) ENGINE=...
2
votes
1answer
94 views

Database Size Troubleshooting

I have a SQL Server database and the .MDF file is almost 9GB in size. However, the data and indexes only seem to be taking up a little over 1GB. I've shrunk the database (with and without ...
101
votes
5answers
76k views

Measure the size of a PostgreSQL table row

I have a PostgreSQL table. select * is very slow whereas select id is nice and quick. I think it may be that the size of the row is very large and it's taking a while to transport, or it may be some ...
1
vote
2answers
22 views

MySQL index size doesn't include all values

I have a table with ~1.4M rows and an id field as primary key and not all primary keys are included in index: mysql> SELECT DISTINCT(COUNT(id)) FROM my_table; +-------------+ | (COUNT(id)) | +------...
0
votes
2answers
119 views

SQL Server : database free space vs data file free space

I don't understand well why the available space in database is 0% while in file is 98% available. Can you explain or advise? (SQL Server 2019, SSMS the newest, one datafile)
0
votes
0answers
25 views

How to find the column value with the biggest storage size in the DB?

Is there any way to find out which column value has the largest storage out of all tables in PostgreSQL DB? I'm looking for currently used storage, information_schema.column only shows the length of ...
0
votes
2answers
29 views

Row size limits in Mysql w.r.t to TEXT and BLOB columns

There is a well-known limitation in Mysql for row size which 65,535 bytes. While going through the docs, I have found that BLOB and TEXT columns only contribute 9 to 12 bytes toward the row ...
0
votes
1answer
73 views

Calculating the total row size of a table - SQL Server

I have a table 'Connections' with the following schema in SQL Server: [ID] [int] IDENTITY(1,1) NOT NULL, [User] [nvarchar](20) NOT NULL, [UserID] [int] NULL, [True] [bit] NOT NULL, [Comment] [...
0
votes
1answer
18 views

MongoDB: Is it possible to search for two fields whose array sizes don't match?

I have a collection that looks something like the following (I have simplified it a lot). I need to query any record that doesn't have the same number of customersAccepted entries as customersInvited. ...
5
votes
2answers
1k views

Table size grows indefinitely after deleting and then inserting the same data

I create a table and populate it with data: create table tab as select 'value' || level val from dual connect by level <= 10000; If I then delete all rows and insert the same data: delete from ...
9
votes
1answer
4k views

Why *not* ERROR: index row size xxxx exceeds maximum 2712 for index “foo”?

We have repeatedly seen failing attempts to index columns with values exceeding a maximum size. Postgres 10 has this kind of error message for it: ERROR: index row size xxxx exceeds maximum 2712 for ...
-1
votes
3answers
3k views

Oracle data file size

My client’s tablespaces are autoextend off and i add monthly or bimonthly 3 or 6 gb space for tablespaces. Can you advise me if there is a recommended datafile size for Oracle 11gR2 on Windows 64 Bits?...
1
vote
2answers
224 views

Appropriate tempdb size?

DBCC CHECKDB is failing on a particular database because of Could not allocate space for object 'dbo.SORT temporary run storage: 143479689576448' in database 'tempdb' because the 'PRIMARY' ...
1
vote
2answers
28 views

does pg_dumpall run vacuum?

Can someone confirm if pg_dumpall does a vacuum? I cannot explain the size differences between a local and dumped database but thinking duplicate/rewritten entries are ignored 350mb inside psql with \...
5
votes
2answers
8k views

Different MySQL Datafile Sizes After Restoration

I'm quite new in database administration. The database architecture of my current company is master-slave replication. We are using MySQL version 5.0.86. Some weeks ago, we upgraded the company's ...
7
votes
1answer
4k views

Estimating the size (of the records) and the overhead in Postgres

Consider the following table in Postgres 9.4: CREATE TABLE t ( a1 bigserial, a2 bigint NOT NULL, a3 bigint NOT NULL, a4 integer, a5 timestamp with time zone NOT NULL, a6 timestamp with ...
0
votes
2answers
25 views

Considerable size difference between mysql versions

We usually employ different MySQL versions for different scenarios. And I realized that similar databases, whith the same amount of tables and data, just because of different mysql versions differs in ...
2
votes
1answer
185 views

Calculating total “on row” bytes for each row … the easy way

We want to calculate the total "on row" storage bytes for each row in the table. As we understand it, we must add up the DATALENGTH() of each column while also accounting for NULLs and things like ...
3
votes
1answer
14k views

Find actual data size from a query?

Is it possible to find the size of data that will be returned by a particular query? For example, I can use the following to find the number of rows per date: select mydatecolumn, count(*) from ...
2
votes
4answers
9k views

In Postgres, set log_rotation_size but my logs are still not rotating

I’m using Postgres 9.5 on Ubuntu 14.04. I wanted to rotate my logs whenever they reach a certain size. So I edited /etc/postgresql/9.5/main/postgresql.conf and set this log_rotation_size = 50MB ...
2
votes
2answers
4k views

how to reduce the size of the datafiles of a oracle DB?

we use a oracle db (11g release2) and the undo tablespase exists of two datafiles and requires 48 GB. But we just need this size for the boot and the import. Currently we just use 10 % from the ...
1
vote
1answer
74 views

How to know exactly when my Database / Log files grew?

Is there a way to see when (history / log records) of .mdf / .ldf files grew? Ultimately, is it possible to setup alerting and know immediately when my database / log files grow?
1
vote
1answer
2k 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 ...
2
votes
2answers
751 views

MySQL: optimize column size

I need a tool/command which will check a table then say something like that: columnA use tinyint instead of int columnB use enum instead of varchar I've seen something like this while ago so I do ...
-1
votes
2answers
1k views

How can I estimate the size of a new table?

We have tables with a lot of data (50M new rows each month, just in one table). Now I want to know what would be the impact of adding a new column to those tables, or creating a new table. Something ...
2
votes
0answers
538 views

Insert 2 output result sets from sp_spaceused into Temp Table (SQL Server non-2016)

sp_spaceused, when executed without any parameters, produces 2 result sets database_name, database_size, unallocated_size reserved, data, index_space, unused Usually when you execute some SP, you ...
0
votes
1answer
260 views

Why is my biggest segment resulting in an empty table?

I'm trying to identify top tables by size in my Oracle DB, I tried with select segment_type, segment_name, sum(bytes/1024/1024) MB from user_segments s where segment_type like ...
12
votes
2answers
1k 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'...
5
votes
2answers
1k views

PostgreSQL relation size does not sum up

I have a very large table, with blob fields, called data. I've tried to figure out why it isn't cached well and repeated SELECTs are quite slow: => SELECT pg_size_pretty(pg_total_relation_size('...
0
votes
0answers
188 views

Calculating table size

I'm trying to follow these steps: Space estimation to estimate the size of my table that I'm creating. I specified an INITIAL as 1M and using the steps above I have the following estimations: ...
1
vote
1answer
4k views

How do I limit the size of my Postgres log?

I’m using Postgres 9.5 on Ubuntu 14.04. I notice I’m generating a lot of Postgres logs in /var/log/postgresql/postgresql-9.5-main.log . I would like to limit the size of this file, and doing some ...
-1
votes
1answer
73 views

varray size can be a variable?

I need to create a varray, and its size must be a parameter of the procedure, for example create or replace procedure x (cant number) as type arreglo is varray(cant) of number; elarreglo arreglo :=...
0
votes
1answer
400 views

Storing a json string that is 10 kb in size in a SQL Server CE cell

I have a SQL Server CE database in which I have column that takes values of json strings. These json strings are above 9kb as a result of which I am unable to use varchar or char. I guess I could ...
2
votes
2answers
2k views

Microsoft SQL database table size

I have come across a sizing issue with my database tables becoming too large. Some digging has shown that it is how MS SQL stores the information. I created two test tables and filled them with data: ...
18
votes
2answers
21k views

Why doesn't DELETE + REORG free diskspace (DB2)?

In DB2 I have a table containing large binary data. Now i purged the whole table and ran runstats, reorg, runstats, but the amount of disk space taken does not change. What could be wrong here? The ...
2
votes
2answers
119 views

SQL Server Database size unchanged after dropping File column

I have a database with a table that has about 10 000 records. One of the columns in this table is a VARBINERY(MAX) that is used to store images. A backup of this database is about 1.2GB. It's size as ...
0
votes
1answer
76 views

Difference in size of table between InnoDB and MEMORY engines

Question The same table stored on hard drive (InnoDB engine) takes 930.72 MB when in Ram (MEMORY engine) it takes 1538.54 MB. For what reason? How to calculate space needed to save data in memory? ...
2
votes
1answer
2k views

Using pg_prewarm to load X number of latest rows into cache

We have a large query that is extra slow when customers "run it the first time, early in the morning..." So, I found pg_prewarm that I would like to use load into PG's buffer cache a certain amount ...
0
votes
1answer
1k views

MySql show content of ibdata1 file, block rising exponentially, why is it growing so fast?

I have a database with most of tables being stored on the InnoDB engine, however an alert raised the other day showing up that the ibdata1 file was growing exponentially. For what I searched so far, ...
0
votes
1answer
60 views

SQLite function to specify exactly how the data is stored internally

I have used the typeof() function within SQLite before (http://sqlfiddle.com/#!7/fcf0e/1), but I would like to go a little further this time. I know that INTEGER can be stored internally as 1, 2, 3, ...
5
votes
2answers
18k views

Choosing the right storage block size for sql server

There are many articles on what storage blocks size should be used for sql server e.g. Disk Partition Alignment Best Practices for SQL Server. The right blocks size should improve the performance of a ...
0
votes
1answer
227 views

Log Shipping Disk Sizes

Do the drives that contain the database have to be the exact same size on the primary server as secondary? I currently have a primary database for OLTP and a standby database used for reporting. I'm ...
1
vote
1answer
102 views

INDEX size as bytes - PostgreSQL 9.2

Is there any way to get this query to return the index size as BYTES? SELECT relid::regclass AS table, indexrelid::regclass AS index, pg_size_pretty(pg_relation_size(indexrelid::...
0
votes
1answer
625 views

Schema size [PG TOAST] - PostgreSQL 9.2

I've got the following query to measure the schema's size on my DB: WITH schema_size AS ( SELECT tab.table_catalog AS database_name, tab.table_schema AS schema_name, tab.table_name, ...
2
votes
1answer
470 views

Table size is not changed after new column is added

I am trying to check how the table size is going to be increased after adding new column with default values. I use the following default values: NULL, ''(empty string) and some text(some random text)...
4
votes
2answers
307 views

Adding around 200 rows in a table grows size of the table by 400kb where avg row size is 0.2KB

We are running into an issue where if we look at the avg row size (0.2kb) x number of rows (200) inserted in one of our table, the size should grow by around 40 KB. However the total used space has ...