About SQLite.
#1

So, i heard, that you can use the clause `Key` INTEGER PRIMARY KEY AUTOINCREMENT when creating a table, and that it is more reliable than using SELECT * FROM, but using "SELECT `Key` FROM `Table` WHERE `Bla` = 'Str'" etc.

I heard it is faster to do "SELECT `Key` FROM `Table` WHERE `Bla` = 'Str'" is better than using SELECT * FROM `Table` WHERE `Bla` = 'Str'".

But for example when i use the example with the `Key` sometimes the server crashes.

If code needed, I would like to show.
Sorry for not making it THAT clear, but I want to know the most performance way.
Reply
#2

1. http://sqlite.com/faq.html#q1


2.

Quote:

I heard it is faster to do "SELECT `Key` FROM `Table` WHERE `Bla` = 'Str'" is better than using SELECT * FROM `Table` WHERE `Bla` = 'Str'"

It should be. With * you are getting every field in that row, it's always better just to get the values you need. Are you sure that there is a column called `Key`, I'm not sure if that's a reason for server crashes, but that could be possible.
Reply
#3

Quote:
Originally Posted by thiaZ_
Посмотреть сообщение
1. http://sqlite.com/faq.html#q1


2.



It should be. With * you are getting every field in that row, it's always better just to get the values you need. Are you sure that there is a column called `Key`, I'm not sure if that's a reason for server crashes, but that could be possible.
That's the problem, I don't understand anything from their site..I only understand when someone explains to me.
Thanks for the answer, gotta see what i can do.
Reply
#4

There is a huge difference between the SQLite documentation and this forum. The documentation gives detailed information and good examples, I would prefer the official SQLite site rather than any forum. Users here can't tell you anything more than things that are written there.
Reply
#5

Quote:
Originally Posted by thiaZ_
Посмотреть сообщение
There is a huge difference between the SQLite documentation and this forum. The documentation gives detailed information and good examples, I would prefer the official SQLite site rather than any forum. Users here can't tell you anything more than things that are written there.
True, but since I'm not having English as my native language, it gets pretty hard to understand what they say.
I learned the basic about SQL from scripts and other's sayings...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)