Hi !
This is my first port here, so I hope I’ll do it right :roll:
Actually, I have:
- a VPS server with 256mb of ram only.
- a site with about 30 concurent users
- a datebase with one table that have 300,000 rows, and is 500mb big.
This table contain user messages, so I need to generate a pagination. Pagination require to know the total of message for a user.
From my log files, I can see this:
Reading mysql slow query log from /var/log/mysql/mysql-slow.logCount: 109 Time=10.02s (1092s) Lock=0.98s (107s) Rows=1.0 (109), user[user]@localhost SELECT count(id) FROM cc3_he WHERE display=N AND IDPerso=N
(N mean Number)
So this is the problem: all my pages are taking 10sec+ to load !
The fields:
- id int(12)
- IDPerso smallint(5)
- display smallint(1)
- date int(10)
- from varchar(25)
- from_id int(5)
- from_id2 int(5)
- from_description text
- from_description2 text
- type varchar(20)
- msg longtext
- msg_size int(10)
My indexes on the table are:
- PRIMARY BTREE Oui Non id 312679 A
- IDPerso BTREE Non Non IDPerso 379 A
- date BTREE Non Non date 312679 A
- display BTREE Non Non display 2 A
Someone have an idea ?
Thanks for reading )