Join Bill Weinman for an in-depth discussion in this video Creating indexes, part of PostgreSQL 9 with PHP Essential Training.
Indexes are a useful tool for improving performance when searching large stores of data.…They also have a performance cost on inserting rows into those index tables, and…they have a storage-space cost for the space of the index.…So there are some trade-offs there.…Indexes are created with the CREATE INDEX statement.…So for example, going back to our example SQL here from Chapter 2, we have this…table that we've been using, and let's say it has got some rows of data in it.…
If I wanted to create an index on the animal column, I would do this:…CREATE INDEX, and then the name of the index, and ON, and the table name with…the column in parenthesis. And I say Go and it creates an index.…
And now if I want to see my indexes, I can use the view that I created and say…SELECT * FROM view_indexes.…I see a list of indexes, and one of them is this idxAnimal that I just created…that's owned by sid.…If I want to drop that index, I can drop it with the DROP INDEX statement, and…that drops the index. And now if I do that SELECT again, view_indexes, you see that…
- Installing PostgreSQL
- Understanding database architecture
- Inserting, updating, and deleting data in a table
- Creating a database library
- Indexing ID fields
- Storing numbers, text, and Boolean values
- Reading data
- Using casts to force type
- Using mathematical functions
- Concatenating strings
- Working with date and time functions and operators
- Defining CRUD
- Using PHP to insert, read, update, and delete rows in a database
Skill Level Beginner
PHP with MySQL Beyond the Basicswith Kevin Skoglund10h 26m Intermediate
1. Quick Start
2. Creating a Database
3. Data Types
4. Storing and Reading Data
5. SQL Expressions
6. Mathematical Functions and Operators
Using math functions3m 2s
7. String Functions and Operators
8. Date and Time Functions and Operators
9. PHP Interfaces
10. Web Applications
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.