See Also backup, full backup, table. 

## partial index 

 An index  that represents only part of a column value, typically the first N characters (the prefix ) of a long VARCHAR  value. 

See Also index, index prefix. 

## partial trust 

 An execution environment typically used by hosting providers, where applications have some permissions but not others. For example, applications might be able to access a database server over a network, but be “sandboxed” with regard to reading and writing local files. 

See Also Connector/NET. 

## Performance Schema 

 The performance_schema  schema, in MySQL 5.5 and up, presents a set of tables that you can query to get detailed information about the performance characteristics of many internal parts of the MySQL server. See Chapter 27, MySQL Performance Schema . 

See Also INFORMATION_SCHEMA, latch, mutex, rw-lock. 

## Perl 

 A programming language with roots in Unix scripting and report generation. Incorporates high-performance regular expressions and file I/O. Large collection of reusable modules available through repositories such as CPAN. 

See Also Perl API. 

## Perl API 

 An open-source API  for MySQL applications written in the Perl  language. Implemented through the DBI  and DBD::mysql  modules. For details, see Section 29.9, “MySQL Perl API” . See Also API, Perl. 

## persistent statistics 

 A feature that stores index  statistics for InnoDB tables  on disk, providing better plan stability  for queries . For more information, see Section 15.8.10.1, “Configuring Persistent Optimizer Statistics Parameters” . See Also index, optimizer, plan stability, query, table. 

## pessimistic 

 A methodology that sacrifices performance or concurrency in favor of safety. It is appropriate if a high proportion of requests or attempts might fail, or if the consequences of a failed request are severe. InnoDB  uses what is known as a pessimistic locking  strategy, to minimize the chance of deadlocks . At the application level, you might avoid deadlocks by using a pessimistic strategy of acquiring all locks needed by a transaction at the very beginning. 

Many built-in database mechanisms use the opposite optimistic  methodology. 

See Also deadlock, locking, optimistic. 

## phantom 

 A row that appears in the result set of a query, but not in the result set of an earlier query. For example, if a query is run twice within a transaction , and in the meantime, another transaction commits after inserting a new row or updating a row so that it matches the WHERE  clause of the query. 

This occurrence is known as a phantom read. It is harder to guard against than a non-repeatable read , because locking all the rows from the first query result set does not prevent the changes that cause the phantom to appear. 

Among different isolation levels , phantom reads are prevented by the serializable read  level, and allowed by the repeatable read , consistent read , and read uncommitted  levels. 

