Environment: Win7 SP1pg:9.3.5
1, create user postgres, password is also postgres:
NET user Postgres Postgres/add
2, in the database root directory to create a data directory:
C:\Program FILES\POSTGRESQL\9.3>MD Data
3,
To see this problem on the understanding that:
How does MySQL query select * FROM table where ID in (hundreds of or thousands of IDs) increase efficiency? Modify
Electronic Business website, a commodity property sheet, hundreds of thousands of
I. In && No inWHERE expression in (subquery)Inside the right parenthesis is a subquery result set that returns a field, and the left expression (or field) evaluates each row of the query once and compares it, and if there are equal rows in the
Business extension fields are often stored in the database using JSON-formatted data, which involves a headache, assuming that a value in the extension field should be used as a query condition, and PostgreSQL itself supports this query.Example:
PostgreSQL User management:Default User:Postgres when the installation is complete, a user named Postgres is automatically created in the operating system and the Postgres database, together with a database named Postgres.1. Group roles:A group role
The default database for hive is Derby, and this database is for self-debugging, but it's a bit of a challenge to face a lot of data, so next I'm going to swap derby for PostgreSQL, and I'll talk about what to look for in the replacement process.
1.1.1 Software Installation1. set user groups and user levelsPostgresql cannot run as root and will run as a different identity, so the corresponding users and groups must be established. (1) New Database user groups: Groupadd Database(2) New Pgsql
One, to see which users are linked to the databaseSelect from Pg_stat_activity;The pg_stat_activity here is actually a view, and its definition can be found in the View section of the Postgres database.Second, kill the process now we find all the
Gearman is a good thingGearman client--------------> Gearman Server Clients is requesting to handler something,Gearman Server is delivering jobsGearman workers get some jobs and finish.So different programming languages can work together.Now we need
When the PostgreSQL server process down is detected, the running state is no action# more Pg_server_check.sh#!/bin/shExport Path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binPrefix=/etc/init.ddaemon= "$prefix/postgresql"Runn_str=
Developers who have just been familiar with PG will encounter some problems when they touch pg.The common performance is to bump into some slow SQL. Don't throw up the groove at this time. The vast majority is not a problem, a slight grammatical
About concurrent Indexing: http://58.58.27.50:8079/doc/html/9.3.1_zh/sql-createindex.html Write this blog from a handsome guy. The problem of table lock occurred in indexing. Let's introduce the index syntax for PostgreSQL:version:9.1 CREATE
Indexed by: Unique index, primary key index, multi-attribute index, partial index, expression index.Index type: b-tree,hash,gist,gin and expression indexPostgreSQL all indexes are "subordinate indexes", that is, the index is physically detached from
The "Timeline" (Timeline) is a very distinctive concept for PG, which appears in the documentation of backup recovery. But the detailed explanations for this concept are very few and not very well understood, so let's take a closer look at
Vacuum is an important task in PostgreSQL database management.
The reason is as follows:
Release the disk space occupied by update/delete rows.
Updates the statistics used in the PostgreSQL query plan.
This prevents old data from being lost due
Name
PREPARE -- create a prepared Query
Synopsis
PREPARE plan_name [ (datatype [, ...] ) ] AS statementDescription
PREPARECreate a prepared query. A Prepared query is a server-side object that can be used to optimize performance. In
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service