SQLite - Time queries
#1

Hello, I have a question:
I use the SQLite database (standart a_sampdb.inc):
Time queries such as "SELECT" no more than 2 ms (for the complex - about 5 ms), but the queries such as "UPDATE" - about 150 ms, and I think that 150 is too much!
Please tell me this is normal or not?
- - - - -
What is the maximum length of a query using db_query?
Reply
#2

Optimize your update queries and table design then.

also, this doesn't belong in this forum sections.
Reply
#3

Quote:
Originally Posted by JernejL
Посмотреть сообщение
Optimize your update queries and table design then.

also, this doesn't belong in this forum sections.
You can make a fair amount of assumptions here:
1) He doesn't sound like a very experienced coder so his tables are likely very simplistic with few columns.
2) His queries will be simple so there is little to nothing to optimize
3) 150ms for a query that writes is a significant amount of time
4) His tables likely have little data so indexing isn't going to make that huge of a difference

With these assumptions in mind, I'd say that he is having disk i/o issues on an update which takes 150ms. I have fairly complex/indexed queries (multi-joins, sub-selects, etc) which only take 5-7ms and similarly with updates.
Reply
#4

How I can optimize my UPDATE queries?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)