Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8246353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:28:47+00:00 2026-06-07T22:28:47+00:00

I have an application where performance is very critical issue. The application has 50.000

  • 0

I have an application where performance is very critical issue. The application has 50.000 users with a lot of searches. Currently I store country code as char(2) in users table and then I retrieve country from countries php array.

$countries = array("AF"=>"Afghanistan","AL"=>"Albania",...)

I do similar with about 6 more attributes and all of them has similar number of values. This is helpful because no join is needed.

Speaking only about performance, what would be faster, to keep storing country names and other attributes in array or making for each attribute join with another table where names for each code would be stored?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:28:50+00:00Added an answer on June 7, 2026 at 10:28 pm

    It really depends on where your performance bottleneck is. If you have nice tables in your database with proper indexes, your DB will return the data nice and quick. If it is your DB that is being smashed though, that might make a difference that isnt good.

    On the other hand, if your server is very heavy on the CPU cycles and is maxing out constantly, let the DB handle the join. The other thing to consider is memory use – an array with country codes isn’t a big thing, but an array with a list of products in it, that might suck up some ram – and if you have a lot of concurrent users, that might not be a good thing for performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to create a very high performance application. Currently, I am using Entity
I'm currently working on some performance critical code, and I have a particular situation
I currently have an application, where it's primary performance issue is using file-based database
I've got an performance issue in my application using a MSSQL DB. I have
I have a VERY performance-sensitive application, and am curious about if I can save
In my Java application I have found a small performance issue, which is caused
What tools for server side application performance testing you suggest? Have an application server
Possible Duplicate: Linq performance for in-memory collection I have a web application with around
I'm doing some performance tuning and capacity planning for a low-latency application and have
I have to check memory performance of my application, I have solved Leaks now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.