# Slow access to Percona Server 5.7 with current libraries

**URL:** <https://forums.percona.com/t/slow-access-to-percona-server-5-7-with-current-libraries/6542>\
**Category:** Percona Server for MySQL 5.7\
**Created:** [August 27, 2018, 3:17am UTC](https://forums.percona.com/t/slow-access-to-percona-server-5-7-with-current-libraries/6542 "2018-08-27T03:17:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pludikovsky](https://avatars.discourse-cdn.com/v4/letter/p/c77e96/32.png) [@pludikovsky](https://forums.percona.com/u/pludikovsky)\
**Post date:** [August 27, 2018, 3:17am UTC](https://forums.percona.com/t/slow-access-to-percona-server-5-7-with-current-libraries/6542/1 "2018-08-27T03:17:56Z")

</div>

We recently upgraded our core servers from Percona Server for MySQL 5.6 to 5.7, running on Ubuntu 16.04. Right afterwards we experienced huge delays on our front-facing servers (also Ubuntu 16.04).

One of the query where we noted issues:

```auto

-- `users` is INTEGER NO NULL
-- `deleted_at` is DATETIME
set &#64;rand_id=floor(rand() * 1000000); explain SELECT `users`.* FROM `users` WHERE `users`.`deleted_at` IS NULL AND `users`.`id` = &#64;rand_id limit 1\G
Query OK, 0 rows affected (0.00 sec)

***************************1. row***************************
id: 1
select_type: SIMPLE
table: users
partitions: p4
type: const
possible_keys: PRIMARY,index_users_on_deleted_at
key: PRIMARY
key_len: 4
ref: const
rows: 1
filtered: 100.00
Extra: NULL
1 row in set, 1 warning (0.44 sec)

```

1k , which took the time for 1k queries down to ~2.5 seconds.

Can anyone explain why we’re seeing much better query times by switching from the client library for Percona Server 5.7 to that for 5.5 ?

Client App is Rails 3.2 (yes, I know; no, we can’t upgrade it ATM) using ActiveRecord, running as Passenger inside nginx.
