SunQuest
           Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old November 14th, 2003, 02:52 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Can a Select query "lock" the database?

I recently had a problem with a MySQL database that I query using PHP. The site was running properly and suddenly, it was impossible to edit the database (browsing was still possible).

My hosting provider told me "that some of
the larger/complex queries seem to be locking the database. The "SELECT DISTINCT" queries may be causing this issue. "

Is it possible? And how can I identify which query lock the database?

Thanks for your help.

Reply With Quote
  #2  
Old November 15th, 2003, 02:25 PM
-vertigo- -vertigo- is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Louth, Lincolnshire
Posts: 314 -vertigo- User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 24 sec
Reputation Power: 2
RE: Can a Select query

How much load is on your database?

As far as I know, insert queries and such are delayed until all pending selects are finished. If selects come in all the time, it is possible the otbers are never performed.

If you want to modify a table, you can get a write lock on it, since then no more queries will start on it. Don't quote me on this, read the manual for 'lock table'.

Reply With Quote
  #3  
Old November 19th, 2003, 07:55 PM
lg lg is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 14 lg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 43 sec
Reputation Power: 0
RE: Can a Select query

I finally found the problem. There was a Select query that missed () and it sort of locked the database.

I had something like "AND entreprise like '%xyz%' OR entreprise like '%abc%'" while I needed "AND (entreprise like '%xyz%' OR entreprise like '%abc%')

Quite simple but I looked a while before catching this one!

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Can a Select query "lock" the database?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway