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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:17:59+00:00 2026-06-12T18:17:59+00:00

I need to maintain an application of mass email sender. The last programmer did

  • 0

I need to maintain an application of mass email sender. The last programmer did a nice job, but the boss feel that a little optimizations could be done on the database treatment. When a campaing is finished, the report gives the option to save the selected segment. For instance, we send 50000 emails, and we want to save the segment of people who open the newsletter (2000) The tool now creates a new segment duplicating the contacts (with an INSERT), but I think we could improve the tool by saving the id of each contact.

I would like to know if saving the contacts whith an sql IN statement would increase the performance of the tool, or there is another way to perform this. Something like:

  1. Create a list of the ids of the contacts SELECT * FROM contacts

  2. SELECT * FROM contacts WHERE idContact IN (all_contacts_comma_separated) –> I would save
    this

Thanks in advance

PD: It’s a production environment, so I need to be sure before made any changes 🙁

  • 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-12T18:18:00+00:00Added an answer on June 12, 2026 at 6:18 pm

    You didn’t say where the list of people who opened the email currently resides. If it’s not in the database what code/process will you use to generate your IN statement list? If it is in the database why not JOIN your tables to get the information?

    Either way I’d not recommend using IN when you have 2000 items in the list.

    It might also be worth you reading the following:

    SQL Server: JOIN vs IN vs EXISTS – the logical difference

    It’s written with SQL server in mind (and I’m not sure it all directly applies to MySQL) but the concepts are interesting and you should perform testing before changing your production environment, as eggyal’s comment suggested.

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

Sidebar

Related Questions

We have an Excel application that I need to maintain that has shown his
Folks, I need to maintain a C#/.Net desktop application. So, I need to set
There is a project that I need to maintain that talks to mysql via
I was advised in a previous question that I didn't need to maintain the
I need to print XML that I manipulated using groovy and maintain the attribute
Calling image = Image.open(data) image.thumbnail((36,36), Image.NEAREST) will maintain the aspect ratio. But I need
I need to maintain the querystring in all pages in my asp.net mvc(C#) application.
I'm building an application on Phone 7 using Silverlight and need to maintain some
I need to maintain state in a PL/SQL application. It needs to hold a
I maintain a web application (ASP.NET/IIS7/SQL2K8/Win2K8) that needs to access documents, actually hundreds of

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.