Marco Baar wrote:
of cause your right.

hello dear Nuno Pereira,


I use mysql since 2 years and collected about 50 MB user data. I ve got a
performance problem during selecting the main table. The table has about
200.000 rows and I make a simple select. I only select over 4 attributes
with "=", no joins, no subselects etc. The select needs 0,3 secs I think
thats normal. But I had to change it and now it has an ORDER BY <DATE> LIMIT
50. Now the select take 3,5 secs and slows down my computer completely. (The
sound stops)

2nd question:
I wanna run my tool as a daimon or server in background. It must not slowing
down my PC, but it does during SQL command (e.g. bigger selects ). Is it
possible im multiuser mode to set a user to low priority. This user is the
daimon so it can run in background without making problems.

So long
Marco Baar
Germany



--- Ursprüngliche Nachricht ---
Von: Nuno Pereira <[EMAIL PROTECTED]>
An: Marco Baar <[EMAIL PROTECTED]>
Kopie: mysql@lists.mysql.com
Betreff: Re: Performance problem
Datum: Thu, 29 Sep 2005 11:24:00 +0100

What?

Please post in english.

Marco Baar wrote:

Hallo,

Ich benutze mysql seit 2 Jahren. Inzwischen haben sich 50MB Nutzdaten
angesammeln und hab ein Problem mit der Performance während der Abfrage
meiner "Haupttabelle".
Die Tabelle hat ca 200.000 Datensätze und ich mache im verhältnis zu

anderen

Abfragen doch ein eher simplen select.
Ich selektiere mit Prüfung auf 4 Attribute (mit "=" ) und es dauert

0,2-0,4

sekunden. Damit kann ich leben. Diese Abfrage musste ich abwandeln und

will

mir nur die ersten 50 Ergebnisse anzeigen, die nach Datum sortiert sind.
Diese allerdings dauert ~3,5 sekunden und legt meinen Rechner lahm.

Sogar

der Sound wird unterbrochen.

2. Frage: Ich würde dies gerne als Daimon oder Server im Hintergrund

laufen

lassen, so dass mich die Datenbankabfragen nicht im Laufenden Betrieb
stören. Trotzdem sollen doch relativ complexe Abfragen gemacht werden.

Ist

es möglich, bestimmte Benutzer mit sehr geringer Priorität auszustatten,
dass deren Abfrage nicht über einen bestimmten %-Wert der Cpu-last geht

und

somit den laufenden Betrieb nicht stören?

Vielen Dank für die Bearbeitung meiner Anfrage.

Marco Baar

--
Nuno Pereira




Maybe a post in the list would be good...

1st question)
There are no miracles: Order the data takes time.
A solution would be to place indexes on the columns in the order by.
It would also help to run something like this from time to time: "ALTER TABLE main_table ORBER BY order_columns". That would help to have the rows ordered.

2nd question)
You can have limits on the accounts in terms of querys per hour, number of connections, and thinks like that, not select priority. See this: http://dev.mysql.com/doc/mysql/en/user-resources.html
Does it help?

--
Nuno Pereira


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to