![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 945 Pomógł: 7 Dołączył: 15.03.2005 Skąd: katowice Ostrzeżenie: (0%) ![]() ![]() |
witam,
mam tabele z 220 tys rekordów i chce policzyc wszystkie ktore spelniaja jakis warunek ale to tra bardzo dlugo. ok 30 sek.
czy mysql ma jakies wbudowane funkcje np count_big tak jak w sql server 2000 Ten post edytował acztery 15.03.2006, 00:18:26 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarząd Postów: 2 277 Pomógł: 6 Dołączył: 27.12.2002 Skąd: Wołów/Wrocław ![]() |
Manual MySQL podpowiada
Cytat If you very often need to calculate results such as counts based on information from a lot of rows, it's probably much better to introduce a new table and update the counter in real time. An update of the following form is very fast:
This is really important when you use MySQL storage engines such as MyISAM and ISAM that have only table-level locking (multiple readers / single writers). This will also give better performance with most databases, because the row locking manager in this case will have less to do. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 3.10.2025 - 17:48 |