Take a shot at enabling the profiling (Jeremy provided a link a few msgs
back) - it'll give you a huge amount of detail.
-joe
On 3/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Well crud. My host won't turn on slow query logging. So, if you know
> you've got a bunch of not-so-good que
Well crud. My host won't turn on slow query logging. So, if you know
you've got a bunch of not-so-good queries (as shown above), how would
one try to spot them?
On Mar 10, 4:58 pm, "gilhad" <[EMAIL PROTECTED]> wrote:
> On Mar 7, 4:26 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > My
On Mar 7, 4:26 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> My site just keeps getting bigger and bigger, and the performance has
> gotten excruciatingly slow.
> ...
> Problem is, I really don't know what to do about it, or even what I
> need to be looking at, really. I've gone through a
On Mar 9, 4:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Both those numbers seem pretty excessive to me. My question to this
> board is, what sort of query would lead a newbie like myself into this
> sort of mess.. in other words, what would be an example of bad code
> I've probably don
I still don't have slow query logging set up, but I am looking at my
database, and what jumped out was:
Handler_read_rnd3,013 k
The number of requests to read a row based on a fixed position. This
is high if you are doing a lot of queries that require sorting of the
result. You probably h
Bren, I hear ya, but I'm finding a lot of easy fixes while I really
pick through my (not-very-good) code. It's been pretty instructional.
Thanks to everyone for your suggestions. Lots to chew on here.
On Mar 7, 3:50 pm, "Bren" <[EMAIL PROTECTED]> wrote:
> Personally, I would not get into those
Personally, I would not get into those details until you profile your
database. Like someone else said, if you're using MySQL turn on the
slow query log. If you run Postgres I'm sure you can find plenty of
documentation about how to monitor and tune that. I just did this and
found two queries that
i do not know the answer to your question, but it reminded me that
there is a decorator like @login_required or something that you could
use in stead of checking your self. (if it applies to your case).
konstantin
On Mar 7, 4:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On a more spec
On a more specific note, I'm finding lots of places I've done
something like:
if request.user.is_authenticated() and request.user.is_staff):
It seems to me there's a redundant check being made there. Wouldn't
one have to be authenticated for is_staff to evaluate to true, meaning
I can safely just
Hello,
First, If you use many relations it is very important to use JOIN
like: Example.objects.filter(first_object__second__third=something)
It is important to use select_related too (also in template!!)
example:
{% for item in example.objects.all %}
{{ item.related_object.value }}
{% endfo
On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Sounds good. How does one go about profiling? Is there a tutorial or
> something you can point me to?
If you're on Linux and Apache, you'll like this:
http://www.rkblog.rk.edu.pl/w/p/django-profiling-hotshot-and-kcachegrind/
--~--~-
First, what database platform do you use: MySQL or Postgres.
MySQL has ways of logging slow queries (see /etc/mysql/my.cnf), this
will give you an understanding of which queries are slow and you may
be able to add indices where necessary. Secondly, if you use
PHPmyAdmin it can tell you what tunin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> For what it's worth, I have found some things, most notably that I was
> - for whatever reason - cycling through every post for every topic
> when I built the topic list. That might be slowing things down a bit.
Such things are the reason for bad
Sounds good. How does one go about profiling? Is there a tutorial or
something you can point me to?
Also, I appreciate everyone's patience with these dumb and vague
questions. It's frustrating being a stupid newbie.
For what it's worth, I have found some things, most notably that I was
- for wha
On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I think the problem lies in the forum (a modified Myghtyboard install)
> and in it's relationship to users. Since both forum posts and users
> keeps growing, I wonder if I've created some sort of exponential
> growth situation for myself.
It's entirely possible my data relations aren't optimal. The database
may need indexes, I may be making too many queries. All of these are
very good possibilities. Problem is, I don't really know where to
begin checking this stuff. Obviously, I'm in over my head, but I'm
trying to learn to swim he
[EMAIL PROTECTED]:
> My site just keeps getting bigger and bigger, and the performance has
> gotten excruciatingly slow.
- database needs indexes?
- check how many queries your views generate. Perhaps you need
reorganization or select_related.
--
noris network AG - Deutschherrnstraße 15-19 - D-
Hello,
may be your data model is not optimal? too many relations? relations
are too complex?
konstantin
On Mar 7, 10:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> My site just keeps getting bigger and bigger, and the performance has
> gotten excruciatingly slow.
>
> I think the proble
My site just keeps getting bigger and bigger, and the performance has
gotten excruciatingly slow.
I think the problem lies in the forum (a modified Myghtyboard install)
and in it's relationship to users. Since both forum posts and users
keeps growing, I wonder if I've created some sort of exponen
19 matches
Mail list logo