Segments and segmentation is the same?

Hello guys, i am really confused about the segmentation part.

My questions are:

The segment use log data or use processed data (archive data) ?
If i create a segment with api, and i run console command (./console core:archive) than piwik will create new segment report as well?

And now the confusing part:

If i create an api call like this:

This will generate a new Report or just filter the log data and don’t save anything?
Or It is just on-demand filtering?
If it’s create a new Report than, if i run next time the console command (./console core:archive), it will create this report as well, or it will just updated when i call this api call again?

So basically saving a segment can cause better performance? Has it any advantage? Or it just good for save the segment definition and nothing else?
What’s the difference between creating a segment with SegmentEditor.add, and if i just add &segment=definition in the api call?

A segment ‘filters’ both - archived and raw data from e.g. the log_visit-table. That depends on the report you’re viewing.

A segment is only archived if you edit/add it with the parameter autoArchive=1, else the segmentation will only filter (in realtime) on the default/complete raw/archive tables which can take a long time.

Saving a segment only causes better performance when it is saved with autoArchive=1 (API) or when “Segmented reports are pre-processed” is selected in the GUI segment editor.