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 8655761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:07:05+00:00 2026-06-12T15:07:05+00:00

I am concerned with the performance of a database table i have to store

  • 0

I am concerned with the performance of a database table i have to store data related
with a customer survey application.

I have a database table storing customer responses from a survey. Since the survey questions change according to customer i though instead of defining
the table schema using each questionid as column to define it as as follows

    customerdata(customerid  varchar, 
         partkey varchar, 
         questionkey varchar, 
         value, varchar,
         version, int,
         lastupdate, timestamp)

Where:

partkey: is the shortcode of the part (part1,part2…)

questionkey: is the shortcode of the question
e.g age, gender etc

since some customers fill the survey twice, thrice etc i have added the version column.

With this design customerid,partkey,questionkey and version are primary keys.

i am concerned about the performance with such design. Should i define the other primary keys as indexes ? Would that help ? So far for 30 customers i have 7000 records. I expect to have maximum 300-500. What do you think ?

  • 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-12T15:07:06+00:00Added an answer on June 12, 2026 at 3:07 pm

    Sounds like a pretty small database. I doubt you’ll have performance issues but if you detect any when querying on partkey, questionkey, or version later on you can always add one or more indexes to solve the problem at that time. There’s no need to solve a performance problem you don’t have and probably never will have.

    Performance issues will arise only if you have to perform time-sensitive queries that don’t use the customerid field as the primary filter. I suspect you’ll have some queries like that (when you want to aggregate data across customers) but I doubt they’ll be time-sensitive enough to be impacted by the one second or less response time I would expect to see from such a small collection of data. If they are, add the index(es) then.

    Also, note that a table only has a single PRIMARY KEY. That key can use more than one column, so you can say that columns customerid, partkey, questionkey, and version are part of the PRIMARY KEY, but you can’t say their all “primary keys”.

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

Sidebar

Related Questions

Let's say I have rows of data retrieved from a relational database tables (perhaps
I'm currently building a Jython web app but am concerned about Jython application performance.
In our inventory database (SQL Server 2008 std edition) we have a table (called
I have a tableview with data, that i post to the app engine database.
I have only one table in my mySql database for a very basic website
I've got a scenario where I have a database with one table that gets
I have a SQL Mobile database with one table. It has several columns with
Imagine we have a phpadmin database and we have a table for students and
I am programming a game using C#, thus, I am very concerned about performance.
I'm concerned about the performance of the query below once the tables are fully

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.