Jump to content

Selecting * or calling each field name?


Gayner

Recommended Posts

$DB->query("SELECT * FROM ibf_members");
        

 

I have over let's say 50 Field names in my IBF_members table.

 

So should call what i need let's say about "25-30 field names" seperately, or use the * so it is quicker ?

 

 

Which way is more artificial? and less on the database and performance wise?

Link to comment
https://forums.phpfreaks.com/topic/171236-selecting-or-calling-each-field-name/
Share on other sites

Depending on how many rows you're calling there shouldn't be much of a performance difference.

 

Actually i counte.d.

 

about 150 Field names...  in that 1 table.

 

I only use about 30 on the profile page, should i call them out seperately?

 

I Think i should call them separately, lol

 

 

I would say, yeah, that's probably not the greatest arrangement of data.  You can't think of a way to break it into logical units?  For example, if you have 25 or so of the columns that you frequently use, why not put them together.  Also, fields that are frequently blank, perhaps those should be somewhere else?  Think of it this way; if i have 1,000,000 users, but only 300 of them have some field set, why have room set for all of them?

I would say, yeah, that's probably not the greatest arrangement of data.  You can't think of a way to break it into logical units?  For example, if you have 25 or so of the columns that you frequently use, why not put them together.  Also, fields that are frequently blank, perhaps those should be somewhere else?  Think of it this way; if i have 1,000,000 users, but only 300 of them have some field set, why have room set for all of them?

 

Ic well im glad I made this topic, no wonder my hosting has server status in red all the time, LOL Because each time a profile is view it's mysqling over 120 extra fields that means nothing, that could be 4-500 more people.. lol :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.