Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 5,213
» Latest member: tokowin99
» Forum threads: 4,029
» Forum posts: 16,404
Full Statistics
|
Online Users |
There are currently 283 online users. » 0 Member(s) | 280 Guest(s) Applebot, Bing, Google
|
Latest Threads |
How to install Archboot i...
Forum: Network Problems
Last Post: Meup
2025-05-13, 01:41 PM
» Replies: 0
» Views: 398
|
clear logs in smoothwall
Forum: Security and Firewalls
Last Post: amanda63
2024-03-10, 03:27 PM
» Replies: 8
» Views: 85,047
|
I cannot install RedHat 8...
Forum: Redhat
Last Post: hybrid
2023-11-11, 01:01 PM
» Replies: 1
» Views: 39,504
|
How things are done, usin...
Forum: Xorg Problems
Last Post: ross
2023-09-04, 09:03 AM
» Replies: 0
» Views: 1,850
|
Im back.....
Forum: Hello
Last Post: anyweb
2021-01-17, 11:36 AM
» Replies: 1
» Views: 5,321
|
add mp3 plugin to xmms in...
Forum: Fedora
Last Post: anyweb
2021-01-17, 11:30 AM
» Replies: 11
» Views: 41,308
|
Configuring VSFTPd Server
Forum: FTP Server
Last Post: Johnbaca
2020-10-14, 10:25 AM
» Replies: 32
» Views: 115,188
|
Wolf won't play sound!
Forum: Game Problems
Last Post: Guest
2020-10-03, 05:51 PM
» Replies: 1
» Views: 53,353
|
Using git + python
Forum: How Do I?
Last Post: Clueless puppy
2020-08-21, 04:37 PM
» Replies: 0
» Views: 43,613
|
what does your nick mean ...
Forum: Hello
Last Post: volt
2020-08-06, 03:25 PM
» Replies: 28
» Views: 41,663
|
|
|
chaining mysql queries |
Posted by: hijinks - 2006-06-14, 05:28 PM - Forum: LAMP
- Replies (3)
|
 |
So I have been coding php/mysql for around 7 years now and I have recently began to look at how things I do affect speeds of the webapp. I read somethinga bout chaining mysql queries together so I wrote a little benchmarking script and was shocked when i saw the results.. First here is the script
Code: $iter = 100000;
$mysqli = new mysqli("localhost", "root", "", "test");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
function getmtime() {
$a = explode (' ',microtime());
return(double) $a[0] + $a[1];
}
$start = getmtime();
for ($i = 0; $i < $iter; $i++) {
$mysqli->query("INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')");
$mysqli->query("INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')");
$mysqli->query("INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')");
$mysqli->query("INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')");
$mysqli->query("INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')");
$mysqli->query("INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')");
/*
$mysqli->query("
INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5');
INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')
INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')
INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')
INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')
INSERT INTO employee_data(f_name,l_name,title,age,yos,salary) VALUES('Mike','Doe','CEO','100000','26','5')
");
*/
}
$end = getmtime();
$time = $end - $start;
echo "the time: $time";
So the normal slow query is uncommented and when i run that it creates 600k new rows in around 55 seconds.. now if comment out the first part and uncomment the chaining section where my 6 queries get run in 1 mysqli->query call it gets run in 5 seconds.
Now to now chain your queries takes 10x longer.. so if you are running multiple updates or inserts per page.. make sure you chain them together!
|
|
|
Can anyon help with installing RPMs? |
Posted by: dam - 2006-06-10, 07:05 AM - Forum: Package Management
- Replies (2)
|
 |
When I double click an RPM it says it's installing but then I don't see it anywhere to run it from. I have read that putting all of the RPMs in a folder then setting this as a folder of packages in yast can let me install them using yast but it won't let me do this- can anyone help please?
Cheers
Adam
|
|
|
Using older libraries |
Posted by: Tom R - 2006-06-09, 02:23 PM - Forum: Compiling
- Replies (5)
|
 |
I am currently running SuSE 10.0 which uses kde3 (3.4.2) and qt 3.3.4
I am trying to compile an app that was built with older versions of the kde and qt libraries. Specifically, kdelibs-1.1.2 and qt-1.4.4. If I install these lib's will it screw up my desktop and/or other apps that rely on kde/qt?
I should note that I have tried to load the rpm and Yast gives me package dependancy errors referring to these libs.
|
|
|
just started here on ln - so hello !!! |
Posted by: noriko - 2006-06-09, 09:31 AM - Forum: Hello
- Replies (4)
|
 |
hello, my name is artemi (ravenn) stein - i go by the name, noriko.
i'm not exactly a noob, but i'm not exactly elite - i'm prolly, at an intermediate stage with linux after just over a year of first trying linux.
i hope this will be my first successful community action. i'm not very sociable and usally fade away from forums after a little while. anyway. i hope to help those new toi linux in whatever way i can - they can learn from my amazing screwups hehe :-)
|
|
|
hello |
Posted by: dam - 2006-06-08, 07:34 AM - Forum: Hello
- Replies (20)
|
 |
Hi, My name's Dam, I'm from Newcastle, UK and I've just installed suse 10.1 on my PC
I've not used linux at all before so I'll proabbly have a lot of questions but I'll be happy to help others if I can
Cheers
Dam
|
|
|
SuSe 10.1 install hangs |
Posted by: outlando - 2006-06-08, 04:30 AM - Forum: SUSE
- Replies (3)
|
 |
I've tried three times now and each time it successfully formats my 1.4Gb swap, and then starts to format my 8.3Gb /root - at this point the progress bar jumps straight to 100% immediately. The timer still runs and the mouse-pointer still moves, for a few minutes. Then it totally freezes and I have to pull the plug on the whole thing and restart the machine.
Anyone have any idea what could be causing this??
I'm installing SuSe 10.1 on a Sony A617B laptop, on the D:\ partition.
Pentium M 1.73ghz
1024 Gb RAM
|
|
|
|