 peewee Documentation Release 3.4.0foreign keys Joining tables Implementing Many to Many Self-joins Performance Techniques Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Update queries Delete queries Query Objects More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Note If you find any bugs, odd behavior, or will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person0 码力 | 349 页 | 382.34 KB | 1 年前3 peewee Documentation Release 3.4.0foreign keys Joining tables Implementing Many to Many Self-joins Performance Techniques Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Update queries Delete queries Query Objects More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Note If you find any bugs, odd behavior, or will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person0 码力 | 349 页 | 382.34 KB | 1 年前3
 peewee Documentation
Release 3.5.0Update queries Delete queries Query Objects More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Changes in 3.0 Backwards-incompatible New stuff will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Once again we’ve run into a classic example of N+1 query behavior. In this case, we’re executing an additional query for every Person returned by the0 码力 | 347 页 | 380.80 KB | 1 年前3 peewee Documentation
Release 3.5.0Update queries Delete queries Query Objects More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Changes in 3.0 Backwards-incompatible New stuff will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Once again we’ve run into a classic example of N+1 query behavior. In this case, we’re executing an additional query for every Person returned by the0 码力 | 347 页 | 380.80 KB | 1 年前3
 peewee Documentation
Release 3.5.0will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Once again we’ve run into a classic example of N+1 query behavior. In this case, we’re executing an additional query for every Person returned by the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re not careful. 1.2. Quickstart 9 peewee Documentation, Release 3.5.0 Before diving0 码力 | 282 页 | 1.02 MB | 1 年前3 peewee Documentation
Release 3.5.0will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Once again we’ve run into a classic example of N+1 query behavior. In this case, we’re executing an additional query for every Person returned by the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re not careful. 1.2. Quickstart 9 peewee Documentation, Release 3.5.0 Before diving0 码力 | 282 页 | 1.02 MB | 1 年前3
 peewee Documentation
Release 3.4.0will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Once again we’ve run into a classic example of N+1 query behavior. In this case, we’re executing an additional query for every Person returned by the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re not careful. 1.2. Quickstart 9 peewee Documentation, Release 3.4.0 Before diving0 码力 | 284 页 | 1.03 MB | 1 年前3 peewee Documentation
Release 3.4.0will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Once again we’ve run into a classic example of N+1 query behavior. In this case, we’re executing an additional query for every Person returned by the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re not careful. 1.2. Quickstart 9 peewee Documentation, Release 3.4.0 Before diving0 码力 | 284 页 | 1.03 MB | 1 年前3
 peewee Documentation Release 3.6.0foreign-keys to the same Model Joining on arbitrary fields Self-joins Implementing Many to Many Avoiding the N+1 problem API Documentation Database Query-builder Fields Schema Manager Model Query-builder Internals Update queries Delete queries Query Objects More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Changes in 3.0 Backwards-incompatible New stuff will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. For an in-depth guide to working with relationships and joins0 码力 | 377 页 | 399.12 KB | 1 年前3 peewee Documentation Release 3.6.0foreign-keys to the same Model Joining on arbitrary fields Self-joins Implementing Many to Many Avoiding the N+1 problem API Documentation Database Query-builder Fields Schema Manager Model Query-builder Internals Update queries Delete queries Query Objects More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Changes in 3.0 Backwards-incompatible New stuff will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. For an in-depth guide to working with relationships and joins0 码力 | 377 页 | 399.12 KB | 1 年前3
 peewee Documentation
Release 3.6.0will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. For an in-depth guide to working with relationships and joins prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Once again we’ve run into a classic example of N+1 query behavior. In this case, we’re executing an additional query for every Person returned by the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re not careful. Before diving into the code, consider how this example is different0 码力 | 302 页 | 1.02 MB | 1 年前3 peewee Documentation
Release 3.6.0will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. For an in-depth guide to working with relationships and joins prints: # Bob 2 pets # Grandma L. 0 pets # Herb 1 pets Once again we’ve run into a classic example of N+1 query behavior. In this case, we’re executing an additional query for every Person returned by the people and the names of all their pets. As you may have guessed, this could easily turn into another N+1 situation if we’re not careful. Before diving into the code, consider how this example is different0 码力 | 302 页 | 1.02 MB | 1 年前3
 peewee Documentation Release 2.10.2foreign keys Joining tables Implementing Many to Many Self-joins Performance Techniques Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Savepoint and ExecutionContext Metadata Types Misc Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Note If you find any bugs, odd behavior, or will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person0 码力 | 275 页 | 276.96 KB | 1 年前3 peewee Documentation Release 2.10.2foreign keys Joining tables Implementing Many to Many Self-joins Performance Techniques Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Savepoint and ExecutionContext Metadata Types Misc Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Note If you find any bugs, odd behavior, or will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person0 码力 | 275 页 | 276.96 KB | 1 年前3
 peewee Documentation
Release 2.10.2will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person dog Grandma L. 0 pets Herb 1 pets Mittens Jr cat Once again we’ve run into a classic example of N+1 query behavior. We can avoid this by performing a JOIN and aggregating the records: >>> subquery from/to-user. (('from_user', 'to_user'), True), ) # a dead simple one-to-many relationship: one user has 0..n messages, exposed by # the foreign key. because we didn't specify, a users messages will be accessible0 码力 | 221 页 | 844.06 KB | 1 年前3 peewee Documentation
Release 2.10.2will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person dog Grandma L. 0 pets Herb 1 pets Mittens Jr cat Once again we’ve run into a classic example of N+1 query behavior. We can avoid this by performing a JOIN and aggregating the records: >>> subquery from/to-user. (('from_user', 'to_user'), True), ) # a dead simple one-to-many relationship: one user has 0..n messages, exposed by # the foreign key. because we didn't specify, a users messages will be accessible0 码力 | 221 页 | 844.06 KB | 1 年前3
 peewee Documentation Release 3.0.0foreign keys Joining tables Implementing Many to Many Self-joins Performance Techniques Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Insert queries Update queries Delete queries More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Note If you find any bugs, odd behavior, or will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person0 码力 | 319 页 | 361.50 KB | 1 年前3 peewee Documentation Release 3.0.0foreign keys Joining tables Implementing Many to Many Self-joins Performance Techniques Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Insert queries Update queries Delete queries More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Note If you find any bugs, odd behavior, or will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person0 码力 | 319 页 | 361.50 KB | 1 年前3
 peewee Documentation Release 3.1.0foreign keys Joining tables Implementing Many to Many Self-joins Performance Techniques Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Update queries Delete queries Query Objects More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Note If you find any bugs, odd behavior, or will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person0 码力 | 332 页 | 370.77 KB | 1 年前3 peewee Documentation Release 3.1.0foreign keys Joining tables Implementing Many to Many Self-joins Performance Techniques Avoiding N+1 queries Iterating over lots of rows Speeding up Bulk Inserts Transactions Context manager Decorator Update queries Delete queries Query Objects More Hacks Optimistic Locking Top object per group Top N objects per group Writing custom functions with SQLite Note If you find any bugs, odd behavior, or will have to perform an additional query to retrieve the pet’s owner. This behavior is referred to as N+1 and it should generally be avoided. We can avoid the extra queries by selecting both Pet and Person0 码力 | 332 页 | 370.77 KB | 1 年前3
共 16 条
- 1
- 2














