Claim 35 Post Templates from the 7 best LinkedIn Influencers

Get Free Post Templates
Raul Junco

Raul Junco

These are the best posts from Raul Junco.

2 viral posts with 4,102 likes, 345 comments, and 453 shares.
2 image posts, 0 carousel posts, 0 video posts, 0 text posts.

๐Ÿ‘‰ Go deeper on Raul Junco's LinkedIn with the ContentIn Chrome extension ๐Ÿ‘ˆ

Best Posts by Raul Junco on LinkedIn

An Interview question every developer should know.

What's the difference between Tokens and API keys?


We use API keys and tokens for authentication and authorization.

But they serve different purposes and have distinct characteristics.


๐—ง๐—ผ๐—ธ๐—ฒ๐—ป๐˜€ (๐—น๐—ถ๐—ธ๐—ฒ ๐—๐—ช๐—ง - ๐—๐—ฆ๐—ข๐—ก ๐—ช๐—ฒ๐—ฏ ๐—ง๐—ผ๐—ธ๐—ฒ๐—ป๐˜€):

Carries user context and permissions for authentication and authorization.

Encoded with a user ID, permissions, and expiration time, often in JWT format.

Critical for user-specific access, like accessing a user's profile data in an e-commerce platform.

It is issued by an authentication server after user login and contains user-specific information.


๐—”๐—ฃ๐—œ ๐—ž๐—ฒ๐˜†:

Primarily for identifying the application or the consumer making the API call.

They are long strings we pass in the header or as a query parameter in the API request.

You use API keys when access does not involve user context. For example, accessing a public API or service-to-service communication.

They are long-lived and created through the API provider's platform or admin console.


๐—œ๐—ป ๐˜€๐—ถ๐—บ๐—ฝ๐—น๐—ฒ ๐˜๐—ฒ๐—ฟ๐—บ๐˜€:

-API keys are for identifying applications.
-Tokens are for managing user sessions, permissions, and context.

Which one have you used the most?
Post image by Raul Junco
90% of the candidates will fail this SQL question.

What's wrong with this query?


The initial query is functionally correct; it will compile and even work in a small set, but as soon as your data grows, it will let you down.

Using the YEAR() function in the WHERE clause can have two significant drawbacks:

๐Ÿญ. ๐—ฃ๐—ฒ๐—ฟ๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐—ป๐—ฐ๐—ฒ ๐—œ๐—บ๐—ฝ๐—ฎ๐—ฐ๐˜ ๐——๐˜‚๐—ฒ ๐˜๐—ผ ๐—™๐˜‚๐—น๐—น ๐—ง๐—ฎ๐—ฏ๐—น๐—ฒ ๐—ฆ๐—ฐ๐—ฎ๐—ป

When the YEAR() function is applied to s.SaleDate, SQL needs to evaluate this function for every row in the table.

This often results in a full table scan, where every row is checked against the condition. That will hurt, especially for tables with millions of rows.

๐Ÿฎ.ย ๐—œ๐—ป๐—ฒ๐—ณ๐—ณ๐—ฒ๐—ฐ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—œ๐—ป๐—ฑ๐—ฒ๐˜… ๐—จ๐˜€๐—ฒ

The function YEAR(s.SaleDate) prevents the query optimizer from using any indexes on the SaleDate column.

Indexes help the database quickly locate and filter the relevant rows, but they cannot be used when the column is wrapped inside a function.

As a result, the query's performance suffers because the database is unable to take advantage of the available indexing.

๐—” ๐—•๐—ฒ๐˜๐˜๐—ฒ๐—ฟ ๐—”๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฎ๐—ฐ๐—ต

Use a range-based query that allows the database to utilize indexes effectively.

The BETWEEN clause filters records by defining a range of dates (2024-01-01 to 2024-12-31).

The query optimizer will use any index on the SaleDate column to locate the relevant rows without scanning the entire table.


You may make your query/code more complex since you must generate those dates. This is a trade-off, and I'm willing to pay any day for good performance.

Usingย functions in the WHERE clause is a performance killer!
Post image by Raul Junco

Related Influencers