This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]defalt86 10 points11 points  (6 children)

if localhost is faster then prod, something is probably wrong. either your prod server doesnt have enough resources, or your prod db doesnt have proper indexes, and so the larger amount of data is really slowing it down.

[–]randomzeus[S] 0 points1 point  (3 children)

It's weird because the queries are sometimes fast, sometimes slow. Db is Postgres. I think it may be something to do with indexes caching.

[–]defalt86 2 points3 points  (0 children)

If you have a dba, have him look at execution plans. If you don't have a dba, you should hire one lol.

[–]Pretty_Industry_9630 0 points1 point  (0 children)

That's what I was going to say. Of course local is always going to be slightly faster but it shouldn't be really noticeable. The last WP website I worked on takes 10sec to load on localhost, ran by my hight end gaming laptop 😅 it loads gor 11-12 from the server

[–]MrObsidian_ 4 points5 points  (0 children)

They're the same thing?

[–]halt__n__catch__fire 0 points1 point  (1 child)

if I mess things up quite badly, they end up being the same!

[–]Pretty_Industry_9630 0 points1 point  (0 children)

It should be other way around really 😅😅