FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
PHP Efficency
Message  

Reply with quote
Post PHP Efficency 
Hello All

I have recently created a php base report that doe several hits on multiple databases and multiple table in those databases using data that is user provided. My problem is that my query's keep putting locks on my database which cause the queries to run significantly slower causing my server to time out.

Any suggestions?


_________________
Jayce Obrigewitsch
IS Support Tech/Web Programmer
View user's profile Send private message

Reply with quote
Post  
perform queries on ids instead of text fields

because int searched fast than a text


_________________
HaRoOn
haroon373@gmail.com
+923216638785
http://www.phpmetablog.com
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger

Reply with quote
Post  
First of all think about your infrastructure. Do you really need multiple databases?

Second of all, normalize the tables and use integer indexes and integer foreign keys to reference table relationships.

You can also try minimizing the columns you select. Instead of doing SELECT *, take a bit of time to write in just the columns you'll actually use.

View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger

Reply with quote
Post PHP Efficency 
Thanks for the reply's.
   The problem is that it is a report that has a lot of information in it. And the company infrastructure is already to large to start consolidating databases into 1.
    I don't use any SELECT * so that is not the issue.
    I think maybe the 1st thing to try is to check to make sure my queries are all done on indexes and also make sure my tables have indexes.

Thanks Again


_________________
Jayce Obrigewitsch
IS Support Tech/Web Programmer
View user's profile Send private message

Reply with quote
Post  
Are you using fulltext search by any chance?

View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  



Google

FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com