Re: [CDBI] Make CDBI go fast
Brad Bowman <[email protected]> Thu, 22 Mar 2007 11:27:35 +1100
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
Michael G Schwern wrote: > Brad Bowman wrote: >> Does any database allow a LIMIT $N index? I mean, maintaining an index >> of the top 10 only, updating as the appropriate. Or is this best done >> another way? > > *snip* > >> Sounds like my suggestion wouldn't apply in any case, given the flexibility >> of the searches. > > Postgres might be able to do it, given its general flexibility. It allows you > to index expressions and using WHERE clauses already. Unfortunately only > indexing the first N doesn't help as soon as someone asks for the next N. > Still, it might help if most folks don't ask for the next page. Don't you just love Postgres: http://www.postgresql.org/docs/8.2/static/indexes-partial.html Mysql, "You cannot associate a trigger with a TEMPORARY table or a view." http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html http://www.flickr.com/photos/bsb/195237640/ Brad -- Furthermore, if you are slain in battle, you should be resolved to have your corpse facing the enemy. -- Hagakure