best query replace this query and which column would be indexCan I speed up this slow query which should be...

Running away from a conflict

Process substitution inside a subshell to set a variable

Sing Baby Shark

If I tried and failed to start my own business, how do I apply for a job without job experience?

Taking an academic pseudonym?

Can you say "leftside right"?

How can I keep my gold safe from other PCs?

Do the speed limit reductions due to pollution also apply to electric cars in France?

Isn't a semicolon (';') needed after a function declaration in C++?

How can I put a period right after the algorithm's number in the algorithm's title?

Was there a pre-determined arrangment for division of Germany in case it surrendered before any Soviet forces entered its territory?

What's the reason that we have different quantities of days each month?

Is practicing on a digital piano harmful to an experienced piano player?

How to write Muḥammad ibn Mūsā al-Khwārizmī?

Promise.all returning empty objects

How would an EMP effect spacesuits (and small-arms weapons)?

How do I narratively explain how in-game circumstances do not mechanically allow a PC to instantly kill an NPC?

Was Opportunity's last message to Earth "My battery is low and it's getting dark"?

Is there a way to pause a running process on Linux systems and resume later?

Does Plato's "Ring of Gyges" have a corrupting influence on its wearer?

Why is Shelob considered evil?

Coworker asking me to not bring cakes due to self control issue. What should I do?

How can guns be countered by melee combat without raw-ability or exceptional explanations?

How to wrap a figure in exam document?



best query replace this query and which column would be index


Can I speed up this slow query which should be limited by MIN/MAX values?Is this update, select combination query thread safe?MySQL - How can I improve this query? EXPLAIN attachedSubquery optimizationMySQL difficulty with optimizing slow query with index but without improvement. Explains tells otherwiseSelect query on an index column with gap lockingTSQL speedup partition by queryUnusual column comparisons and query performanceHow to index two tables for JOINed query optimisationPostgreSQL 9.5 query performance depends on JOINed column in SELECT clause













0















my query like this



select id_request,username_request
from darkhast_follower
where darkhast_follower.id_request != '9762952594'
AND darkhast_follower.status =0
AND NOT exists ( select null
from log_follow
where log_follow.other_id = darkhast_follower.id_request
AND log_follow.id= '9762952594' LIMIT 1)LIMIT 1



log_follow has 30 milion row
and darkhast_follower has 1000 row



log_follow indexed other_id and id
darkhast_follower indexed id_request and status
this is slow
i have 40k activate user



soryy for bad english



darkhast_followerlog_follow









share



























    0















    my query like this



    select id_request,username_request
    from darkhast_follower
    where darkhast_follower.id_request != '9762952594'
    AND darkhast_follower.status =0
    AND NOT exists ( select null
    from log_follow
    where log_follow.other_id = darkhast_follower.id_request
    AND log_follow.id= '9762952594' LIMIT 1)LIMIT 1



    log_follow has 30 milion row
    and darkhast_follower has 1000 row



    log_follow indexed other_id and id
    darkhast_follower indexed id_request and status
    this is slow
    i have 40k activate user



    soryy for bad english



    darkhast_followerlog_follow









    share

























      0












      0








      0








      my query like this



      select id_request,username_request
      from darkhast_follower
      where darkhast_follower.id_request != '9762952594'
      AND darkhast_follower.status =0
      AND NOT exists ( select null
      from log_follow
      where log_follow.other_id = darkhast_follower.id_request
      AND log_follow.id= '9762952594' LIMIT 1)LIMIT 1



      log_follow has 30 milion row
      and darkhast_follower has 1000 row



      log_follow indexed other_id and id
      darkhast_follower indexed id_request and status
      this is slow
      i have 40k activate user



      soryy for bad english



      darkhast_followerlog_follow









      share














      my query like this



      select id_request,username_request
      from darkhast_follower
      where darkhast_follower.id_request != '9762952594'
      AND darkhast_follower.status =0
      AND NOT exists ( select null
      from log_follow
      where log_follow.other_id = darkhast_follower.id_request
      AND log_follow.id= '9762952594' LIMIT 1)LIMIT 1



      log_follow has 30 milion row
      and darkhast_follower has 1000 row



      log_follow indexed other_id and id
      darkhast_follower indexed id_request and status
      this is slow
      i have 40k activate user



      soryy for bad english



      darkhast_followerlog_follow







      mysql query-performance optimization index-tuning





      share












      share










      share



      share










      asked 4 mins ago









      Marvan EimazMarvan Eimaz

      11




      11






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230593%2fbest-query-replace-this-query-and-which-column-would-be-index%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230593%2fbest-query-replace-this-query-and-which-column-would-be-index%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

          Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

          How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...