Re: Multiple database queries

2011-03-08 Thread VidJa Hunter
I totally agree with the one database solution, which would be my choice, if there were no legal issues attached to the different datasets. On Mon, Mar 7, 2011 at 10:49 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hey Vidja, > > May I ask why so many dat

Re: Multiple database queries

2011-03-07 Thread Cal Leeming [Simplicity Media Ltd]
Sorry, I should make myself more clear. The complex lookups (such as range queries, full text search etc) take place inside Sphinx Search, then we do ID lookups from the database with the results from Sphinx. You can do column lookups as well on Sphinx >=0.99, so if you wanted to lookup the datab

Re: Multiple database queries

2011-03-07 Thread Cal Leeming [Simplicity Media Ltd]
Hey Vidja, May I ask why so many database instances are required? In my experience, if you get to the point where you really need this many, it's usually better to use a solution like Sphinx Search Engine, then employ your database as a heavy key/value store (with the bare necessary unique compoun

Multiple database queries

2011-03-07 Thread Vidja
Hi all, does anyone have experience with querying against multiple databases and performance issues? My plan is to query against 15-200 instances of a database (Postgres on a 8 core 32 GB machine, each db about 200 mb) , all with the same schema (an thus model file), but with different data. Are

Re: How to get gallery thumbnails without multiple database queries

2010-07-19 Thread Martin Tiršel
On Mon, 19 Jul 2010 00:50:04 +0200, Martin Tiršel wrote: Hello, I have: class Gallery(models.Model): ... class Image(models.Model): gallery = models.ForeignKey(Gallery) ... Now, on some page, I am listing all galleries and I want for every gallery first three (o

How to get gallery thumbnails without multiple database queries

2010-07-18 Thread Martin Tiršel
Hello, I have: class Gallery(models.Model): ... class Image(models.Model): gallery = models.ForeignKey(Gallery) ... Now, on some page, I am listing all galleries and I want for every gallery first three (or three flagged, ...) images as thumbnails. I can go through