Most Popular
1500 questions
1592
votes
9 answers
How do I list all databases and tables using psql?
When I log in with psql --username=postgres, how do I list all databases and tables?
I have tried \d, d and dS+ but nothing is listed. I have created two databases and a few tables with pgAdmin III, so I know they should be listed.
Jonas
- 33,945
- 27
- 62
- 64
577
votes
5 answers
List all columns for a specified table
I'm looking for a precise piece of information in a database which I have no knowledge about. The database is on a separate machine, but I can log into it, and launch a psql command line, with administrator rights.
It's a third-party product, and…
Stephane Rolland
- 8,911
- 11
- 33
- 40
554
votes
4 answers
How do you mysqldump specific table(s)?
How can I dump a specific table or set of tables without including the rest of the db tables?
markdorison
- 5,675
- 3
- 17
- 6
491
votes
2 answers
What's the difference between a temp table and table variable in SQL Server?
This seems to be an area with quite a few myths and conflicting views.
So what is the difference between a table variable and a local temporary table in SQL Server?
Martin Smith
- 87,941
- 15
- 255
- 354
449
votes
5 answers
How do I list all schemas in PostgreSQL?
When using PostgreSQL v9.1, how do I list all of the schemas using SQL?
I was expecting something along the lines of:
SELECT something FROM pg_blah;
Stéphane
- 5,745
- 5
- 20
- 13
419
votes
4 answers
How to insert values into a table from a select query in PostgreSQL?
I have a table items (item_id serial, name varchar(10), item_group int) and a table items_ver (id serial, item_id int, name varchar(10), item_group int).
Now I want to insert a row into items_ver from items. Is there any short SQL-syntax for doing…
Jonas
- 33,945
- 27
- 62
- 64
384
votes
12 answers
connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host
I am trying to run a website sent to me but after doing so this error appeared
connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "4X.XXX.XX.XXX", user "userXXX", database "dbXXX", SSL off in C:\xampp\htdocs\xmastool\index.php on…
Jin
- 3,953
- 3
- 14
- 6
355
votes
3 answers
How can I time SQL-queries using psql?
I would like to benchmark some SQL-queries agains my PostgreSQL database. Is there any way I can time SQL-queries using psql?
Jonas
- 33,945
- 27
- 62
- 64
314
votes
10 answers
List the database privileges using psql
I'm in the middle of a database server migration and I can't figure (after googling and searching here) how can I list the database privileges (or all the privileges across the server) on PostgreSQL using the psql command line tool?
I'm on Ubuntu…
pedrosanta
- 3,463
- 3
- 17
- 7
303
votes
15 answers
Can MySQL reasonably perform queries on billions of rows?
I am planning on storing scans from a mass spectrometer in a MySQL database and
would like to know whether storing and analyzing this amount of data is remotely
feasible. I know performance varies wildly depending on the environment, but I'm
looking…
haxney
- 2,503
- 2
- 15
- 7
302
votes
18 answers
How can I monitor the progress of an import of a large .sql file?
I am importing a 7 GB foobar.sql to restore a table in a local database.
$ mysql -h localhost -u root 'my_data' < foobar.sql
$ mysql --version
/usr/local/mysql/bin/mysql Ver 14.12 Distrib 5.0.96, for apple-darwin9.8.0 (i386) using readline…
qazwsx
- 3,507
- 9
- 23
- 21
299
votes
4 answers
Why Does the Transaction Log Keep Growing or Run Out of Space?
This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:
In SQL Server -
What are some reasons the transaction log grows so large?
Why is my log file so big?
What…
Mike Walsh
- 18,278
- 6
- 50
- 74
288
votes
7 answers
When should I use a unique constraint instead of a unique index?
When I want a column to have distinct values, I can either use a constraint
create table t1(
id int primary key,
code varchar(10) unique NULL
);
go
or I can use a unique index
create table t2(
id int primary key,
code varchar(10) NULL
);
go
create…
bernd_k
- 12,369
- 24
- 79
- 111
281
votes
10 answers
What are the main differences between InnoDB and MyISAM?
What are the main differences between InnoDB and MyISAM?
ilhan
- 3,039
- 5
- 21
- 13
261
votes
5 answers
'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
I am trying to backup mysql using the command
mysqldump -u root -p database_name > backup.sql
, but it is throwing an error:
'Access denied; you need (at least one of) the PROCESS privilege(s)
for this operation' when trying to dump…
subhanshu kumar