The tag has no wiki summary.

learn more… | top users | synonyms

12
votes
3answers
6k 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 ...
12
votes
3answers
2k views

Why might a table's data space take up 4x the size of the raw data?

I have a table with 490 M rows and 55 GB of table space, so about 167 bytes per row. The table has three columns: a VARCHAR(100), a DATETIME2(0), and a SMALLINT. The average length of the text in ...
9
votes
5answers
499 views

SQL Server Backups - A couple of questions

We run our weekly backup job at 9pm on Fridays and we are experiencing a couple of issues with regard to disk space (which gets perilously low at times) and performance. We're looking at ...
8
votes
2answers
638 views

Strategy to handle an SQL Server DB with too many files (BLOBs) in it?

Scenario: SQL Server 2005 database servicing an ASP.NET application (on a separate web servers). Database: DB has about 5GB of "normal" data in it, and about 15GB of "files" (e.g.: a 200k PDF stored ...
7
votes
1answer
1k views

PostgreSQL: Disk space not released after TRUNCATE

I haveTRUNCATEd a huge (~120Gb) table called files: TRUNCATE files; VACUUM FULL files; The table size is 0, but no disk space was released. Any ideas how to reclaim my lost disk space? UPDATE: The ...
6
votes
2answers
16k views

How do I shrink the innodb file ibdata1 without dumping all databases?

InnoDB stores all tables in one big file ibdata1. After dropping a big table, the file is keeping its size no matter how big the table was. How can I shrink that file without having to dump and ...
5
votes
3answers
9k views

T-SQL query to report disk space allocation and used space for auto-grow SAN databases

We are using 6 databases in total for an application, and we can only share 4TB of space for all 6 databases (via SAN storage). I'd like to write a query (report) for a single database indicating the ...
5
votes
2answers
4k views

How to delete a Backup from a backup set in SQL Server 2008 R2

The title pretty much sums it up. We are running out of space on our backup disks, and need to remove old backups out of the set. I can't seem to find any information on this.
5
votes
1answer
3k views

Understanding block sizes

My question targets Postgres, but answers might just be good enough coming from any database background. Are my assumptions correct: Disks have a fixed block size? RAID controller can have a ...
5
votes
1answer
522 views

PostgreSQL strategies to deal with disk filling up

I'm using PostgreSQL (8.4) to store data produced by an application making frequent inserts (in the table structure described below). The database keeps growing with time and, since the newer data is ...
4
votes
1answer
210 views

How large are blocks of data in SQL Server?

I'm working in SQL Server 2008 R2 and have created a query that gathers and sums the total of data files and log files' sizes. However, I can't find how much actual disk space a single block of SQL ...
4
votes
2answers
631 views

Index Generation in Postgres

We have a database with a single table made up of around 700 million entries. We update the database by adding new entries on a server then transfer the server to the production server using pg_dump: ...
4
votes
4answers
3k views

Empty strings in VARCHAR(MAX) consuming space which cannot be recovered

I have a table with a non-nullable VARCHAR(MAX) column where every row contains an empty string (third party database so I can't change it). I see a huge amount of space use, over 15GB for 1 million ...
4
votes
1answer
3k views

Safe way to truncate SQL Server Error Log

We are running out of space. What is the safe way to clear the error log?
4
votes
1answer
204 views

Is there some drawback to define SPARSE columns?

I have a table which has a lot of NULL values in columns. But some columns don't contain NULLs at all (although nullable). Is there some drawback to declare all of these columns as SPARSE?
4
votes
1answer
7k views

How to free up disk space? which logs/directories to clean?

I want to free up the disk space on my Linux machine. I've drill down the space usage and found that the following directories have a big size /u01/app/11.2.0/grid/cv/log ...
4
votes
2answers
1k views

Partitioning and freeing disk space

I am running MySql innodb with innodb_file_per_table. As a daily script, I would like to create a new partition for a set of tables, as well as delete yesterday's partitions. What command would need ...
3
votes
2answers
2k views

Disk space full but logical space available in database

We have a fairly big MS SQL 2008R2 database that resides on a SSD drive. The drive itself only has ~110Gb of space, and the database files are the only files on the drive. The database is in "Simple" ...
3
votes
3answers
3k views

Can I specify a different disk for a specific MySQL table?

I use my home machine as my personal database for my hobby analytics project. This machine has an SSD for the main drive where MySQL stores its data. It also has a secondary hard drive that is ...
3
votes
2answers
3k views

PostgreSQL: Query for location of global tablespace?

I have been trying to make our database clients pro-active about not filling up the partition on which the database they are using resides. As all our clients are on the same host as the database ...
3
votes
1answer
77 views

For alignment optimized table is bigger than original table - why?

In another question I learned that I should optimize the layout from one of my tables to save space and have better performance. I did this, but ended up with a larger table than before and ...
3
votes
2answers
2k views

Freeing disk space after dropped database

I'm working on a dev system, and I have been restoring to a database, say "foo", that I'm using for dev purposes. As I'm working through the kinks, I've just been running DROP DATABASE foo. However, I ...
3
votes
3answers
123 views

Log File Management - Space on Disk

At our organisation we have several non-Production environments where Developers run free and wild with TSQL code and databases. The DBA team do not normally monitor or maintain them. Recently several ...
3
votes
1answer
15k views

How to Recover an InnoDB table whose files were moved around

So I have a test db server that was setup on a replication stream. Over the name an optimize came through that quickly filled up the space on the slaves datadir. Mysql dutifully was just waiting for ...
3
votes
1answer
2k views

Drop user did not reduce size of tablespace file

I have a development environment in which I frequently copy a certain schema. When I'm done with the copy, I will use OracleEM to drop that user/schema. My problem is that this does not seem to ...
3
votes
2answers
474 views

SQL Server 2005: Full-text search space requirements

Is there a way to calculate the physical drive space required for a full-text search catalog? Space is cheap, but I'd like to know what I'm getting into. I'm looking at a table of about 200 articles ...
2
votes
1answer
92 views

Is DBCC SHOWFILESTATS an accurate way to see unused space?

We have a few tables each with near 100 million rows of data. A co-worker has these tables setup with partitions based on a date field. Our disk space is starting to run low and knowing that ...
2
votes
1answer
2k views

How do we free up disk space from allocated namespace? / ORA-03297

We are running out of disk space. The server has a 420 GB HDD, and runs a Microsoft SQL Server and an Oracle Server(10g). The Oracle server uses up to 315 GB space. We have just loaded a 100GB ...
2
votes
2answers
78 views

View Disc Usage

Is this statement correct? Behind the scenes SQL Server actually stores the data in the view as a physical table which must be updated if any of the data behind the view changes I did some ...
2
votes
1answer
506 views

Postgres on Engineyard space at 100%, pg_xlog filled up with files

I have a database that is growing rapidly. VERY rapidly. My /db directory is at 100% now, and there are a bunch of new files in pg_xlog. My background is in Oracle and MySQL. I do not know what is ...
2
votes
2answers
613 views

PostgreSQL: Separate tables vs single table to perserve disk space?

I have 2 tables with the below schemas with equal number of rows. When I run the SELECT relname, relpages FROM pg_class ORDER BY relpages DESC command, they show up as 23GB each even though the data ...
2
votes
2answers
559 views

Get disk space percentage free with SQL Server 2005?

I am currently using SQL Server 2005 and (undocumented I believe) master..xp_fixeddrives to get free space on my database volumes as part of my monitoring. However, this only gives me an absolute ...
2
votes
1answer
538 views

Why is SQLite adding unused disk space to “free-list” after deleting a lot of data in a database?

The SQLite FAQ states the following: (12) I deleted a lot of data but the database file did not get any smaller. Is this a bug? No. When you delete information from an SQLite database, the ...
2
votes
1answer
98 views

Huge MSDB database

I have a very large MSDB database and have been working on clearing this out and setting up maintenance tasks - something my predecessor should have done years ago! So far I've managed to truncate ...
2
votes
1answer
679 views

InnoDB: Error: pthread_create returned 12

have installed MySQL in a particular folder. I was able to run the server and create accounts, databases etc. However, now whenever I try to start the server, I get an error: $ mysqld_safe ...
2
votes
1answer
602 views

What are all the reasons/possibilities that may fail to release disk space occupied by TEMPORARY table?

We're using PostgreSQL v8.2.3. Ours is a web-based application and we're using pgpool-II v 2.0.1 purely for connection pooling (we don't use other features of pgpool like Replication, Load Balancing, ...
2
votes
1answer
77 views

Character varying index overhead & length limit

I have a unique constraint on a character varying column that will mostly have lengths of approximately 600 but could get to 10 million. I have read about B-Trees, but I can't determine how much disk ...
2
votes
1answer
158 views

How big can innodb_doublewrite_file grow?

When I use the enable innodb_doublewrite_file ... How big can this file grow ? How can I calculate the optimal disk size, if it would be used only for this file?
2
votes
0answers
60 views

Postgres: missing disk space after truncate and re-insert

We've got a IP address range dataset stored in a table that was truncated and then re-populated with a slightly modified version of the dataset (almost identical in size). However, after truncating ...
2
votes
0answers
437 views

How much disk space needed for 100GB of DBs?

Hard to explain in the title, but I'm planning a migration from SQL Server 2000 databases to SQL Server 2008 R2. The databases are under 100GB total space, but this is only with the Simple recovery ...
1
vote
2answers
3k views

Database running out of space

My database has 16MB of space left. I used to just truncate as I was taught but I found these links that advise against truncating: ...
1
vote
2answers
372 views

Should a SQL Server TempDB space be allowed to be reclaimed?

If I don't have space concerns at the moment, should I size my TempDB as a large space initially and not let it's space be reclaimed? What's the best way determine what the optimal initial size for ...
1
vote
2answers
320 views

Does an analysis/optimization tool like SqlYog exist for SQL Server 2005 (and later)?

I'm curious about effective space allocation of my tables, so: does something like SqlYog exist for SQL Server 2005 (and later)? Of course I know SSMS, but I was looking for something more precise ...
1
vote
2answers
60 views

what is better in terms of allocated space in Oracle Tables: NUMBER or BINARY_FLOAT?

I have a 10 billion records table so I need to improve space allocation. My table has only fields of type floating point (single-precision). What is the best choice, NUMBER or BINARY_FLOAT or ...
1
vote
1answer
160 views

Free space from image column after update

I'm doing some cleanup on one of our database for development purposes on a test server. There are a couple of tables with one IMAGE column. Both tables take roughly 50Gb of space, being the image ...
1
vote
1answer
53 views

1 time shrink of abused databse or restore from backup [duplicate]

I have a database that I have inherited which has been left for a long time to grow and grow. 95% of this growth is caused by 1 log table used by our application. The database is 120GB and in full ...
1
vote
1answer
216 views

Diskspace usage of DB

I have a production database that's consuming a significant amount more disk space than it should be. Using sp_spaceused (only the interesting tables), I get. Table Name Reserved (KBs) Data ...
1
vote
1answer
216 views

Imports & exports under storage constraints and preallocations

I have a 5GB oracle database that I want to export and then import on my own local database. Easy right? The point is, I use oracle XE 10g which allows me to use up to 4GB. I then decided to make the ...
1
vote
1answer
69 views

sql server database size shown different in properties pane

while monitoring when checking database space used,my favorites are use indexinternals sp_spaceused select (sum(size)*8)/1024 as size From sys.master_files where name like 'indexinternals%' ...
1
vote
2answers
152 views

How do I track why my SQL Azure occupied space pulsates?

This is inspired by this StackOverflow question. I have this code: SELECT CONVERT(INT, SUM(reserved_page_count) * 8 / 1024) FROM sys.dm_db_partition_stats for detecting database space consumption ...