Watch out for views in mysql. If the view contains a calculated field (such as MAX() etc.), mysql can't optimize the search correctly, which will result in full table scans, severely hurting performance. Views are bad for performance in mysql until they get this fixed. Indices are a really good idea on heavy tables, though. It sounds to me like you could gain a lot by rewriting your sql. The explain command is helpful here.
On 10/11/06, Chris <[EMAIL PROTECTED]> wrote: > > Jorge Godoy wrote: > > You'll benefit if you use VIEWs and correct indexes. Another thing to think > > about is using prepared statements instead of reissuing the same query over > > and over: as with VIEWs the planner can optimize this and choose a better > > approach to retrieve your data. > > Yes I've heard about those but haven't used them yet as I'm using MySQL > and I think it's new to MySQL. (If only I'd been using PgSQL! ;) ) > > > Also put some limit to the minimum amount of information you should have > > before you touch the database. For example, when using this to "auto > > search" > > the name of a client don't go to the database with just one character; > > instead > > wait for something like 3 or 4 letters to be typed and only then go > > retrieving > > something from the database. > > Good idea. > > > What doesn't make Bob's advice useless, since I believe you won't want > > everybody seeing how much each customer pays for your service... > > You're right, his advice wasn't useless. I just meant that there won't > be anyway for a customer to search other customer's data. Only product > info on the front. Sensitive data in the back. > > > > I will be using LAMP. > > > > As in Linux, Apache, PostgreSQL and Python? ;-) Nice choice. :-) > > haha No.. I'm using the standard definition. :) > > > > That may be what I need to do. > > > > s/may be/is/ ;-) > > We'll see. :) > > > > Chris. > > > > > -- troels --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~----------~----~----~----~------~----~------~--~---
