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

  • Home
  • SEARCH
  • 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 6000963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:46:08+00:00 2026-05-23T00:46:08+00:00

I’ve been having an issue trying to get my simple data analysis program that

  • 0

I’ve been having an issue trying to get my simple data analysis program that uses MySQL to work correctly.

On my Windows 7 computer I use pyodbc and the program runs fine, using pyodbc to connect to MySQL. On Snow Leopard, couldn’t get pyodbc to install correctly so I’m using pymysql instead…

After finally getting pymysql to work, it runs super slow…

Just did a test – ran my program on Mac OS Snow Leopard, through cProfile, and got:

26849449 function calls (26844794 primitive calls) in 103.196 CPU seconds

… (The only method with more than a few seconds total time is recv)

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
   176088   76.960    0.000   76.960    0.000 {method 'recv' of '_socket.socket' objects}

…

Running same program on a Windows 7 virtual machine with pyodbc (connected to same MySQL db running from host computer):

Executing Muncher as the main program.
ncalls tottime percall cumtime percall filename:lineno(function)
512873 function calls (508218 primitive calls) in 6.849 CPU seconds

Does anyone know what could be causing this? Looks like most of that time was spent on _socket.socket’s ‘recv’ method, which according to Google is something that receives data. Is that method broken or something? Seems ridiculous it would take almost 15x times as long.

And I guess a better question might be…what’s the best way to connect to MySQL on Mac OS? I have tried pyodbc as well as MySQLdb so far with no luck getting them to install.

  • 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-05-23T00:46:08+00:00Added an answer on May 23, 2026 at 12:46 am

    First you should make sure you are actually comparing the same things.

    sockets ‘recv’ method means that the program is waiting for something, so if your program actually does the same thing on both the W7 machine and the Mac, that could mean that the network latency is different.
    (For example if your Mac is using Wireless network and the Windows 7 machine uses wired network)

    To rule out that you could try comparing pyodbc and pymysql on the Windows machine. Do you still get the same difference in speed then?

    Typically, if most of the time is spent in ‘recv’, the problem is outside your application (and outside pyodbc/pymysql).

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I'm looking for suggestions for debugging... If you view this site in Firefox or
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I want to count how many characters a certain string has in PHP, but

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.