Re: what is the speed hit of "SELECT *" with MySql, as opposed to narrower database calls?



*** lkrubner@xxxxxxxxxxxxx wrote/escribió (9 Apr 2005 12:40:13 -0700):
> SELECT * FROM weblogs
>
> as opposed to
>
> SELECT id, headline FROM weblogs

The query itself is faster with *. Performance issues arise when you are
reading fields you don't need, which can happen:

* When your script doesn't use all table fields.

* If you add new fields to a table and do not edit *all* the scripts that
use these tables.

Performance gain with * is minimal but potential loss is huge: imagine you
add a BLOB field to store files (let's say, a picture of the country) and
retrieve the complete image from DB everytime you want to create a <select>
field to choose countries.


--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
.



Relevant Pages

  • Re: HELP! Need AD Query for Last login
    ... query the DCs in the USA domain, how would I modify the script? ... I'm new to VB script and making this simple modification is beyond me at ... >> ' Because the lastLogon attribute is not replicated, ... Then, for each Domain Controller, ADO is used to search the ...
    (microsoft.public.scripting.vbscript)
  • Re: LDAP query information
    ... a "Dim" statement. ... script is run. ... Microsoft MVP Scripting and ADSI ... Can you please provide me info on what to do with the below query? ...
    (microsoft.public.windows.server.scripting)
  • Re: LDAP query information
    ... execution of the vbscript? ... The error message indicates the line number in the script, ... Dim strBase, strFilter, strAttributes, strQuery, adoRecordset ... ' Construct LDAP syntax query. ...
    (microsoft.public.windows.server.scripting)
  • Re: Searching for Key Words in a String of Text
    ... I pull the transaction text from a query. ... this text from the memo field of a table, but the problem is that my country ... 65,000 records of bank transactions and flag those transactions that contain ...
    (microsoft.public.access.queries)
  • Re: An application, script, or AD Saved query that ...
    ... It is a multi-step operation as you can't create a query that says give me all users who aren't in a mail enabled group. ... So the most efficient way I can visualize this is that your script will need to find all members of all mailenabled groups. ... This you will enumerate the members and stick them in a hash/dictionary/whatever it is called in the scripting language you use, basically you want an associative array. ...
    (microsoft.public.windows.server.active_directory)