Re: Several queries consume 100 % processor
От | Richard Huxton |
---|---|
Тема | Re: Several queries consume 100 % processor |
Дата | |
Msg-id | 46544A26.6070700@archonet.com обсуждение исходный текст |
Ответ на | Re: Several queries consume 100 % processor ("J. ORIOL" <famach@yahoo.com>) |
Список | pgsql-general |
J. ORIOL wrote: > > I'm filling a 40 x 10 matrix of data (A string grid), that's 400 > cells being calculated aproximately with 6 to 8 queries each one of > them. That's 4800 queries to fill the matrix. In the server, this > task delays 8 secs. but in the client are 40 secs. What takes 40 seconds? If you're just running updates then the client should receive acknowledgement. > The server slows down all its processes, sorry, does'nt "stop" tasks, > but in the practice, its the same, I think. > > Certainly, I want to know if I have serious design errors or if I > have reached my HW limits; my hope was implementing functions in > plpgsql, but you guys said this will not improve the process time as > well. You'll need to tell us something about your design. See my first reply for what people will need. As to whether your hardware is a limit - nobody can say without knowing what you're doing with it. Four obvious things leap out though: 1. Why does it take 6-8 queries to calculate one value? 2. What makes it necessary to calculate one cell at a time rather than all at once? 3. Are you vacuuming enough, and how have you established this? 4. Why are you doing this in a database at all? For 4800 values I'd just calculate them all in my application and then store the lot in one go. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления: