hoho Posted August 17, 2015 Report Share Posted August 17, 2015 Sveiki, Mēģinu ar php pieslēgties pie cita servera, mssql un vienkārši nolasīt visus datus: SELECT top 100 field1, field3, field3 FROM aspnet_db WITH (NOLOCK) Viss strādā ātri. Bet ja nolasīt visus datus, 12000 ierakstus, strādā ļoti lēni, ~26s: SELECT field1, field3, field3 FROM aspnet_db WITH (NOLOCK) Uz paša servera nostrādā momentāni. Kur varētu būt problēma? Quote Link to comment Share on other sites More sharing options...
Blitz Posted August 17, 2015 Report Share Posted August 17, 2015 Kādas manipulācijas ar datiem veic php? 12k ir diezgan daudz Quote Link to comment Share on other sites More sharing options...
Val Posted August 17, 2015 Report Share Posted August 17, 2015 Atšķirību "top 100" laikam var redzēt jebkurš? Quote Link to comment Share on other sites More sharing options...
Kasspars Posted August 17, 2015 Report Share Posted August 17, 2015 Gribi teikt uz servera momentāni izvada 12000 ierakstus? Quote Link to comment Share on other sites More sharing options...
hoho Posted August 18, 2015 Author Report Share Posted August 18, 2015 Jā, uz servera SELECT * FROM aspnet_db strādā momentāli, izvada 12000 ierakstus. Ar Php , kas atrodas uz cita servera kādu 1000 arī ātri izvada, bet 12000 jau ~26s Quote Link to comment Share on other sites More sharing options...
hoho Posted August 18, 2015 Author Report Share Posted August 18, 2015 Nav nekādu manipulāciju, vienkārši SELECT un datu attēlošana: while ($Row = mssql_fetch_assoc($result)) { print $Row['id'] . "<br>"; } Quote Link to comment Share on other sites More sharing options...
Blitz Posted August 18, 2015 Report Share Posted August 18, 2015 nu izvāc šito un tad apskaties cik ātri strādā, jo lasīšana no resultseta un 12k ierakstu outputa sutišana klientam arī aizņem laiku. Quote Link to comment Share on other sites More sharing options...
Kavacky Posted August 18, 2015 Report Share Posted August 18, 2015 Gribi teikt uz servera momentāni izvada 12000 ierakstus?A kas ir 12k ierakstu? Quote Link to comment Share on other sites More sharing options...
Kasspars Posted August 18, 2015 Report Share Posted August 18, 2015 Ja tie ir 12000 bloga ierakstu, tad apmēram 100Mb Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.