Questions tagged [database]

System that handles large amounts of data in an organised fashion

A database is a system of handling and organising large amounts of data that can be easily created, reference or edited.

SQL (Structured Query Language) is a database computer language that is designed for managing the data in a relational database management system.

Some popular database systems include:

  • FileMaker Pro
  • IBM DB2
  • Microsoft Access
  • MySQL
  • Microsoft SQL Server
1665 questions
205
votes
13 answers

How do I load a sql.gz file to my database? (importing)

I'm trying to import a gzipped SQL file into mysql directly. Is this the right way? mysql -uroot -ppassword mydb > myfile.sql.gz
Alex
  • 8,111
  • 24
  • 71
  • 99
76
votes
8 answers

AWS RDS connection limits

RDS server come up with 40 connection max, as in the following documentation I am using Magento 1.9, and at some points, i reach the max number then website is out of service. Do you have any recommended way to solve this issue? From my…
Alaa Badran
  • 873
  • 1
  • 7
  • 7
66
votes
7 answers

What are the drawbacks of running a database inside a virtual machine? How do I overcome them?

Running anything inside a virtual machine will have some level of performance hit, but how much does it really impact the performance of a database system? I found this academic reference paper with some interesting benchmarks, but it was a limited…
Russ
  • 713
  • 1
  • 5
  • 7
49
votes
7 answers

What is the best Linux filesystem for MySQL (InnoDB)?

I tried to look for benchmark on the performances of various filesystems with MySQL InnoDB but couldn't find any. My database workload is the typical web-based OLTP, about 90% read, 10% write. Random IO. Among popular filesystems such as ext3, ext4,…
Continuation
  • 3,050
  • 5
  • 29
  • 38
49
votes
4 answers

MySQL: creating a user that can connect from multiple hosts

I'm using MySQL and I need to create an account that can connect from either the localhost or from another server, i.e. 10.1.1.1. So I am doing: CREATE USER 'bob'@'localhost' IDENTIFIED BY 'password123'; CREATE USER 'bob'@'10.1.1.1' IDENTIFIED BY…
DrStalker
  • 6,676
  • 24
  • 76
  • 106
45
votes
7 answers

Is it safe to have SQL Server auto-shrink turned on?

There are many SQL Server options that can be enabled for databases, and one of the most misunderstood ones is auto-shrink. Is it safe? If not, why not?
Paul Randal
  • 7,184
  • 1
  • 35
  • 45
43
votes
3 answers

Export and import a PostgreSQL database with a different name?

Is there a way to export a PostgreSQL database and later import it with another name? I'm using PostgreSQL with Rails and I often export the data from production, where the database is called blah_production and import it on development or staging…
Pablo
  • 7,249
  • 25
  • 68
  • 83
40
votes
6 answers

Mysql: Working With 192 Trillion Records... (Yes, 192 Trillion)

Here's the question... Considering 192 trillion records, what should my considerations be? My main concern is speed. Here's the table... CREATE TABLE `ref` ( `id` INTEGER(13) AUTO_INCREMENT DEFAULT NOT NULL, `rel_id` INTEGER(13) NOT NULL, …
Sarah
  • 403
  • 1
  • 5
  • 5
37
votes
1 answer

What can user do with VIEW SERVER STATE permissions?

In SQL Server 2008 there is a permissions VIEW SERVER STATE. What rights this permission give to user? What SQL Server mean by SERVER STATE?
36
votes
2 answers

How can I do a dump of only the table structure in PostgreSQL?

In a similar vein to this question, how would I do a schema-only dump in PostgreSQL?
warren
  • 17,829
  • 23
  • 82
  • 134
36
votes
2 answers

How do you do load testing and capacity planning for databases?

This is a canonical question about capacity planning for databases. Related: Can you help me with my capacity planning? How do you do load testing and capacity planning for web sites? I'm looking to create a canonical question of tools and…
gWaldo
  • 11,887
  • 8
  • 41
  • 68
36
votes
2 answers

Postgres: Non zero exit code when executing a sql file?

I am writing a shell script which makes calls to psql using 2 forms... one is by command (-c), the other is by file (-f). e.g. psql -c "create table foo (bar integer)" psql -f foobar.sql One difference between these forms is that a call by command…
Jin Kim
  • 963
  • 2
  • 9
  • 12
33
votes
7 answers

Database server: Small quick RAM or large slow RAM?

We are currently designing our new database servers, and have come up with a trade off I'm not entirely sure of how to answer. These are our options: 48GB 1333MHz, or 96GB 1066MHz. My thinking is that RAM should be plentiful for a Database Server…
Josh Smeaton
  • 1,330
  • 2
  • 19
  • 31
31
votes
1 answer

How can I verify that a SQLite db3 file is valid/consistent

I have some sqlite version3 db3 files I copied off a live running production system (I know bad sysadmin bad sysadmin) for various reasons. Is there some sqlite command I can run that will verify that all the data can be read out of these files (I…
hellomynameisjoel
  • 2,170
  • 1
  • 18
  • 23
29
votes
3 answers

How does one list warnings from the 'mysqlimport' utility?

To start off, this is not about loading data from within MySQL itself, but using the command-line tool "mysqlimport". I am using it to load a CSV directly into a table and need to see the warnings it has generated. I cannot seem to get warnings to…
brink
  • 293
  • 1
  • 3
  • 5
1
2 3
99 100