473,322 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

What is quicker as Select?

I read somewhere that to gain efficiency it is advisable to avoid the
use of select. But they don't explain why or what to use instead. Is it
true? I habe a problem of speed (better to say of NO SPEED) but I don't
know if it has something to do with the use of select.
Waht can I use instead?

Jul 21 '05 #1
2 1636
be*****@coaster.ch wrote:
I read somewhere that to gain efficiency it is advisable to avoid the
use of select. But they don't explain why or what to use instead. Is it
true? I habe a problem of speed (better to say of NO SPEED) but I don't
know if it has something to do with the use of select.
Waht can I use instead?


Hi,

Not sure, but maybe you misunderstood, and confused the above with SELECT *
and SELECT column1, column2.

SELECT * FROM tblusers;

is slower than

SELECT userid, username FROM tblusers;

So naming the columns is faster than using *, even if you select all
columns.
Reason is that the database has to retrieve the real columnnames first and
replace * with it, before executing the query.

Don't expect huge benefits though.

Besides that: If you use * instead of naming the columns, and the columns
you need are just a small subset of all columns, the naming of columns
clearly will be lot faster because the database has to deliver less data.

Regards,
Erwin Moller
Jul 21 '05 #2
be*****@coaster.ch wrote:
I read somewhere that to gain efficiency it is advisable to avoid the
use of select. But they don't explain why or what to use instead. Is it
true? I habe a problem of speed (better to say of NO SPEED) but I don't
know if it has something to do with the use of select.
Waht can I use instead?

Bettina,

I assume you are talking about using SELECT * vs SELECT
<column-name-list>. If that is so the correct answer is that it
doesn't make any significant difference. Most of the time in
database operations is spent accessing and reading data from the
disk drives -- not processing the data once it has been read.
(The difference is something like ten to one.)

The vast majority of the complaints about database performance
being too slow are the result of not having indexes, not using
the indexes that do exist, and failing to run the RDBMS admin
programs that analyze the data and update the index usage strategy.

HTH
Jerry
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: NotGiven | last post by:
I am researching the best place to put pictures. I have heard form both sides and I'd like to know why one is better than the other. Many thanks!
5
by: MaJoHu | last post by:
I've got a list where u can select some products. It's something like this: <SELECT NAME='Product' MULTIPLE SIZE='10'> <% 'Get every possible item from items table SQL = "SELECT DISTINCT...
13
by: Chris Mantoulidis | last post by:
There must be some tips to make a program quicker. I guess more than 50% of ppl here will say "avoid the if-s". Yeah I know this makes a program quicker but some times an "if" is inevitable,...
1
by: MLH | last post by:
I asked mysql to create a database named credifree (see below) and later checked for filenames on the system like *credifree* but I found nothing indicating that mysql created any filenames like...
6
by: John | last post by:
Just a general question... I'm currently using a combobox that when updated, opens a form with its recordset based on a query using the combo box value as the criteria. I'm I correct in...
8
by: WindAndWaves | last post by:
Hi Gurus I have a query that contains reference to the following function: Public Function UserStatus() As Byte Const ProEro = 1: 'on error GoTo ERR '--- UserStatus = Nz(DLookup("", "", "!="...
2
by: Justin Koivisto | last post by:
In PHP, I do the following (pseudo code for clarity)... Query: SELECT distinct(web_contacts.zip) FROM web_contacts WHERE web_contacts.zip <> '' Query: SELECT DISTINCT(contacts.zip) FROM contacts...
5
by: Rich | last post by:
Hello, I have a search application to search data in tables in a database (3 sql server tables). I populate 2 comboboxes with with data from each table. One combobox will contain unique...
7
by: adam | last post by:
I'm currently coding a CMS system for a site which includes the feature to create multiple sections inside a page. To add each of these new sections I'm using DOM with AJAX to save, but I've got a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.